Hi Vagrant, Vagrant Cascadian <vagr...@debian.org> writes:
[...] >> Did you see my message about integrating a commit-hook similar to what >> Gerrit uses? It produces unique ID such as: >> >> --8<---------------cut here---------------start------------->8--- >> Change-Id: I9b86781869d80eda347659f0c009b8dfe09bdfd0 >> --8<---------------cut here---------------end--------------->8--- >> >> at the bottom (it's a git trailer) of a commit message. Being unique, >> these could be used to match if a patch on the tracker has been merged >> in the master branch. >> >> Attached is what the hook looks like. The random 'Change-Id' is >> generated via >> >> --8<---------------cut here---------------start------------->8--- >> random=$({ git var GIT_COMMITTER_IDENT ; echo "$refhash" ; cat "$1"; } | >> git hash-object --stdin) >> --8<---------------cut here---------------end--------------->8--- > > That seems like it would only work if the patch was identical, as > opposed to a slightly rebased patch on top of newer patches on master? > > How can you correlate Change-Id to a patch in the tracker? The Change-Id stays the same unless you manually edit it out of your commit message when amending / rebasing, so the commit hash may change while the Change-Id stays the same. So you can rebase your feature branch on master and share a v2, whose existing commits will have the same Change-Ids (newly added commits would get their own Change-Id trailer). > Would it break git commit signatures? It doesn't impact git commit signatures. -- Thanks, Maxim