You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pg: add --from-now to start a new push target at the join point
A target's first push has no watermark, so it backfills the entire local
archive. Pushing into a database shared with other people therefore discloses
every session on the machine, including unrelated local work, and there was no
way to ask for "only what happens from here on".
Add SyncOptions.PushFromNow, exposed as `pg push --from-now`, which seeds the
watermark with the push cutoff when a target has no history yet. It is applied
after the existing reset checks rather than before: those treat a watermark
with no matching target fingerprint or PG-side push marker as corrupt local
state and clear it, so a watermark seeded earlier (or from outside the process)
is wiped and the push falls back to a full backfill. It is also ignored for an
explicitly requested full push and for a target that already has history, so it
can only bound a first push, never open a gap in an established one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
cmd.Flags().BoolVar(&cfg.FromNow, "from-now", false, "On a target's FIRST push, start from now instead of backfilling local history (ignored with --full)")
0 commit comments