-
Notifications
You must be signed in to change notification settings - Fork 173
fix(deps): bare cache incompatible with git 2.53.0 safe.bareRepository + fetched SHAs not ref-reachable #1267
Copy link
Copy link
Closed
Labels
area/distributionInstallers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.Installers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.area/lockfileLockfile schema, per-file provenance, integrity hashes, drift detection.Lockfile schema, per-file provenance, integrity hashes, drift detection.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.One manifest, every target. Multi-target deploy, marketplace, packaging, install.type/bugSomething does not work as documented.Something does not work as documented.
Metadata
Metadata
Assignees
Labels
area/distributionInstallers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.Installers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.area/lockfileLockfile schema, per-file provenance, integrity hashes, drift detection.Lockfile schema, per-file provenance, integrity hashes, drift detection.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.One manifest, every target. Multi-target deploy, marketplace, packaging, install.type/bugSomething does not work as documented.Something does not work as documented.
Type
Projects
Status
Done
Summary
Two bugs in
bare_cache.pydiscovered during E2E validation of the SHA-pin fix (#1258 / PR #1259):Bug 1:
git -C <bare>fails on git 2.53.0Git 2.53.0 (Homebrew, macOS) defaults
safe.bareRepository=explicit. All bare-repo git commands inbare_cache.pyusegit -C <path>which now fails with exit 128 on bare repos. The fix is to usegit --git-dir <path>instead (8 locations).Bug 2: Fetched SHAs are not ref-reachable for
git clone --local --sharedWhen
fetch_sha_into_barefetches a specific SHA into an existing bare, the SHA lands in the object store but is not pointed to by any ref.git clone --local --sharedfrom a shallow bare uses upload-pack (ignoring--local) and only transfers objects reachable from advertised refs -- so the orphaned SHA is silently omitted andgit checkout <sha>fails in the consumer.The fix creates a synthetic
refs/heads/apm-pin-<sha12>ref after every successful fetch (or discovery) so the SHA is reachable via the default refspec.Reproduction
Both bugs are exercised by installing a mono-repo package with SHA-pinned transitive deps on git 2.53.0. The E2E test repo
sergio-sisternes-epam/apm-marketplace-testsreproduces this scenario.Environment
safe.bareRepository=explicit(default)