Skip to content

git pack: the push receipt marker requires a reflog write capability the vendor git on macOS does not advertise #2583

Description

@oceanwaves630

The requirement

git.push writes its receipt marker with git reflog write refs/heads/<branch> <sha> <sha> khive-receipt:<id> (ADR-182 §Amendment 4 item 2). reflog write is a Git 2.51 subcommand. macOS ships Apple Git 2.50.1 as /usr/bin/git, so on a stock macOS every git.push refuses unsupported_toolchain before it does anything else, and #2470 records that this also makes every later refusal on that verb unobservable there.

A developer machine with only the vendor git cannot run the push verb at all. That is a large share of the platform the rest of the pack works on.

Why the subcommand was chosen

The marker has to record a receipt id against a branch without moving any ref, index or worktree. update-ref with identical old and new shas appends no reflog entry, so the obvious mechanism records nothing, which is what sent the design to reflog write.

Alternatives worth pricing before this is accepted as a hard floor

  1. A dedicated ref namespace. refs/khive/receipts/<receipt-id> pointing at the pushed sha is an ordinary update-ref, works on every git in use, and is discoverable by for-each-ref. It moves a ref, but not one anybody reads as branch state, and git.reconcile would read it directly instead of parsing a reflog. Costs: the refs accumulate and need a retention rule, and they are pushed only if someone asks for that refspec.

  2. A note. git notes --ref=khive-receipts attaches to the commit rather than the branch. Portable, but it writes an object and the mapping is commit-keyed, while the marker's question is branch-keyed.

  3. Keep reflog write and make the floor explicit. Document the 2.51 minimum in the pack README and the git.push help, and have the remote suite state the requirement once rather than failing twelve arms (this is git pack: remote verbs need git 2.51+ (reflog write); tests should name the requirement #2470's ask). The verb then simply does not exist on a stock macOS.

Option 1 looks closest to the existing contract: git.reconcile already reconciles by reading a marker against a branch, and reading a ref is a stricter read than parsing reflog text.

Ask

A decision recorded in ADR-182 on whether the 2.51 floor stands. If it stands, say so in the ADR with the reason, because today the floor is a consequence of a mechanism choice rather than a stated requirement. If it does not, option 1 is a contained change: one writer, one reader, one retention rule.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions