News for hackers. Stuff that matters.
Re:Better Git configuration by ymse on Wednesday April 05, 2017 @08:37PM (#14046988)
Oddly, the author recommends signing commits, yet uses only fast-forward merges. Little do they know that signed commits necessarily can not be resolved as fast-forwards in a merge situation, since that would require changing the signatures!

Rebasing is the answer, but that will of course re-sign every commit with your key. In a shared repository, I prefer creating "useless" merge commits to changing other peoples signatures.

Re:Better Git configuration by scottnonnenberg on Wednesday April 05, 2017 @08:43PM (#14047021)
My local configuration doesn't need to be ready to create merge commits because those happen on GitHub/GitLab/etc. When I rebase, it's my own pull request on top of a more recent master - the signer remains me.
Re:Better Git configuration by rlpb on Thursday April 06, 2017 @09:32AM (#14050308)
Perhaps I misunderstand you, but a fast forward merge isn't really a merge (there is no merge commit) and by definition doesn't change any commits. So it doesn’t require changing any commits, and therefore no signatures need changing either.

Is there some other part of a workflow that you're inferring here that will need changing commits?

Re:Better Git configuration by growse on Thursday April 06, 2017 @04:08PM (#14054132)
If you have a feature branch with multiple commits signed by multiple people, does rebasing that not invalidate the signatures (changes the parent and thus every hash)?
Re:Better Git configuration by rlpb on Friday April 07, 2017 @08:25AM (#14059045)
I see. The rebasing you mention is part the implied workflow I was missing. I see it now. Yes - if the rule is that merge commits to master are not permitted (ie. all commits must be rebased onto master first), then of course one person cannot rebase someone else's signed commits without losing those signatures. Thanks.

Theoretically one could devise a tool which allows each contributor to re-sign (in the correct order), but I'm not aware that any such thing exists, and it'd probably be too impractical anyway.