Skip to content

No support for GPG signed commits on upstream repo #613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
edvinassabaliauskas opened this issue Mar 25, 2024 · 1 comment · Fixed by #614 · May be fixed by #615
Closed

No support for GPG signed commits on upstream repo #613

edvinassabaliauskas opened this issue Mar 25, 2024 · 1 comment · Fixed by #614 · May be fixed by #615

Comments

@edvinassabaliauskas
Copy link
Contributor

"Remove the .gitrepo file" step filter includes commits that are not needed to be rewritten. Those commits are from upstream repo and if they are GPG signed rewriting drops the signature, changes hashes and later results in failing push.

edvinassabaliauskas pushed a commit to edvinassabaliauskas/git-subrepo that referenced this issue Mar 25, 2024
edvinassabaliauskas added a commit to edvinassabaliauskas/git-subrepo that referenced this issue Mar 25, 2024
admorgan pushed a commit to admorgan/git-subrepo that referenced this issue May 28, 2025
Limit the removal of .gitrepo files to commits on the repo hosting
the subrepo. When using filter-branch and it encountered a merge
commit, continuing the filter on the second branch rewrites all
of those commits, despite that not being necessary for pre-commit.

If the rewritten commits were GPG signed the change in the hash
results in the inability to push to the remote repo.

If during development you were to change to a different branch
on the remote repo that contained a merge, you would not be able
to push upstream because the rewrite would not match the upstream
SHAs.

fixes issue ingydotnet#613
fixes isseu ingydotnet#602
admorgan pushed a commit that referenced this issue May 28, 2025
Limit the removal of .gitrepo files to commits on the repo hosting
the subrepo. When using filter-branch and it encountered a merge
commit, continuing the filter on the second branch rewrites all
of those commits, despite that not being necessary for pre-commit.

If the rewritten commits were GPG signed the change in the hash
results in the inability to push to the remote repo.

If during development you were to change to a different branch
on the remote repo that contained a merge, you would not be able
to push upstream because the rewrite would not match the upstream
SHAs.

fixes issue #613
fixes isseu #602
@admorgan
Copy link
Collaborator

Thank you for this patch. I apologize for not getting to it sooner, but I don't have tests for GPG signed stuff so it took a back seat. My focus on #602 prevented me from seeing the bigger picture. I finally tracked down the solution to #602 and it was the same solution you supplied for this issue. I know you already did a lot of work for this project, but if you have the skill and time, I would happily take a patch adding checks for GPG signed patches in our tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants