On 2023-09-07, Maxim Cournoyer wrote:
> Felix Lechner <[email protected]> writes:
>> On Thu, Sep 7, 2023 at 4:08 AM Giovanni Biscuolo <[email protected]> wrote:
>>>
>>> close the bugs that are listed in
>>> the commit message
...
> 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?

Would it break git commit signatures?


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to