Skip to content

Conversation

@sergiodj
Copy link
Contributor

@sergiodj sergiodj commented Dec 5, 2025

Melange currently barfs on specific cherry-pick situations like the one at wolfi-dev/os#74858 . I spent some time investigating this and found that this happens because the initial git clone to fetch a tag is done in shallow mode, and then subsequent git fetch commands will be constrained by the "shallowness" that was created. I was surprised to find @smoser's #1473 which pretty much reached the same conclusion.

My suggestion is that we should bite the bullet here and just invoke the git fetch that's run during cherry-pick using the --unshallow option. The downside is that this will pull in the entire repository history, which can be a lot in some cases.

Closes: #1473

@sergiodj sergiodj requested a review from smoser December 5, 2025 23:06
@sergiodj sergiodj enabled auto-merge (squash) December 8, 2025 00:07
Melange currently barfs on specific cherry-pick situations like the
one at wolfi-dev/os#74858 .  I spent some time
investigating this and found that this happens because the initial
`git clone` to fetch a tag is done in shallow mode, and then
subsequent `git fetch` commands will be constrained by the
"shallowness" that was created.  I was surprised to find @smoser's
chainguard-dev#1473 which pretty
much reached the same conclusion.

My suggestion is that we should bite the bullet here and just invoke
the `git fetch` that's run during `cherry-pick` using the
`--unshallow` option.  The downside is that this will pull in the
entire repository history, which can be a lot in some cases.

Signed-off-by: Sergio Durigan Junior <sergiodj@chainguard.dev>
@sergiodj sergiodj force-pushed the git-checkout-unshallow branch from e402cb8 to 607b429 Compare December 8, 2025 00:12
@sergiodj sergiodj merged commit 149f46c into chainguard-dev:main Dec 8, 2025
57 checks passed
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.

cherry-pick shows confusing message

2 participants