Skip to content

Atomic ref updates within a sync run (git push --mirror parity) #46

@Soph

Description

@Soph

Status

git-sync doesn't negotiate or set the receive-pack atomic capability today. Logging this as an option we may revisit — comment on this issue if you need transactional pushes and we'll prioritize it.

Background

The atomic capability (gitprotocol-pack.adoc) lets a client signal that all ref commands in one update-request apply or none do. It's what git push --atomic sets — not what git push --mirror sets. Default --mirror is per-ref: each command gets its own ok/ng, partial application is normal.

Where git-sync stands relative to git push:

  • Default git push --mirror → per-ref outcomes, partial apply. git-sync today matches this.
  • git push --mirror --atomic → all-or-nothing within one push. git-sync has no equivalent.

Why we haven't built it

  1. No demand yet. No one has asked for transactional pushes; the per-ref model has been fine.
  2. Conflicts with BestEffort. --all-refs on sync/plan bundles BestEffort, which downgrades per-ref ng to warnings — atomic would defeat that, so it would have to be off for the most common GitHub-mirror config anyway.
  3. Phase shape, not capability, is the real gap. Where git-sync is non-atomic across phases (batched bootstrap tail, replicate's separate delete push), the atomic capability alone doesn't help — those are multi-transaction by design.

Related: #47 (force-with-lease semantics — the per-run lease is what protects against concurrent target writes today, including across batches in bootstrap).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions