3 ms·
Cryptographically signing the commits makes rebasing impossible (or at least more difficult). In some cases the rebase is very clean, and none of the modified
by gus_massa 7y ago
Cryptographically signing the commits makes rebasing impossible (or at least more difficult).
In some cases the rebase is very clean, and none of the modified files had changed by other commits. I guess in this case, git can have a rule to keep a "link" to the old commit and accept the old signature as a signature of the new commit.
In some cases there are trivial changes, like indentation because someone else added an `if` around the code you are modifying. Sometimes part of the problem has been fixed. Sometimes one of the functions you use has an additional parameter. Sometimes the code has been moved to another file. In this cases it is difficult to automatically detect if the new rebased commit is equal enough to the old commit to accept the new signature.
We can go into the big rebase/merge debate. Linus is in the rebase camp.
- mh8h 7y agoThat's because you are not supposed to rebase other people's code on top of a changed base. That can effectively modify the behaviour of their code change. So it's good that the resulting commit won't be signed anymore. And if you are rebasing your own code, then you can sign it again.
- gus_massa 7y agoWhat about cherrypicking bug fixes to old versions?
- jimktrains2 7y agoCherry picking creates a new commit.
- gus_massa 7y agoThe cherry picked comment usually has the same author and date that the original commit. (Note that rebasing also creates a new commit.) One of the latest commits backported to Linux 4.9.something https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.9.y&id=8d8276867b5ac539f1d6e166a028b51c8b1ceda8 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux... Cherrypicked from https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=master&id=060423bfdee3f8bc6e2c1bac97de24d5415e2bc4 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux... Note that the changes are identical, just add ` &&ret` twice, but the line numbers have changed. Also, the cherrypicked version has an additional `Signed-off-by: `.