Skip to content

Refuse to push from a shallow repository - #11

Merged
hmirin merged 1 commit into
mainfrom
reject-shallow-push
Oct 14, 2026
Merged

hmirin merged 1 commit into
mainfrom
reject-shallow-push

Conversation

@hmirin

@hmirin hmirin commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

A shallow source produced a pack whose oldest commits point at parents that
were never sent, so the encrypted remote accepted incomplete history. Check
git rev-parse --is-shallow-repository before building the pack and fail
before anything is published; git fetch --unshallow fixes the source.

The test that published from a shallow clone to check the verified frontier
is replaced by one that checks the refusal and the unshallow recovery.

Salvaged from the unmerged fix/carrier-object-cache branch (71150dc).

A shallow source produced a pack whose oldest commits point at parents that
were never sent, so the encrypted remote accepted incomplete history. Check
`git rev-parse --is-shallow-repository` before building the pack and fail
before anything is published; `git fetch --unshallow` fixes the source.

The test that published from a shallow clone to check the verified frontier
is replaced by one that checks the refusal and the unshallow recovery.

Salvaged from the unmerged fix/carrier-object-cache branch (71150dc).
@hmirin
hmirin merged commit 40bf0ac into main Oct 14, 2026
1 check passed
@hmirin
hmirin deleted the reject-shallow-push branch October 14, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant