Hi Giovanni,

Giovanni Biscuolo <[email protected]> writes:

[...]

>> We could use Gerrit's commit hook that adds a unique ID as a git
>> trailer.
>
> Do you mean "commit-msg" hook as documented here:
> https://gerrit-review.googlesource.com/Documentation/cmd-hook-commit-msg.html
> ?
>
>
> The Gerrit Code Review supplied implementation of this hook is a short shell 
> script which automatically inserts a globally unique Change-Id tag in the 
> footer of a commit message. When present, Gerrit uses this tag to track 
> commits across cherry-picks and rebases.
>
>> Then it should become possible to
>>
>> 1. Check if all items of a series have appeared in the git history
>> 2. If so, close the associated issue if it was still open
>
> Thinking out loud:
>
> a. each contributed patch will have a unique Change-Id, persistent
> across rebases (and git commit --amend), and every new patch version
> (produced during patch revision) will have the same Change-Id; this is
> valid for all commits in a patch set

Correct.

> b. when all "Change-Id"s of patches contained in a patch set are listed
> in the git history (of one of the official branches) the associated
> issue can be closed

That was my idea.

> c. how do we get the issue number of a patch containing "Change-Id"? [1]

We'd have to search through the currently opened patches issues; I
assume using a tool like the 'mumi' command we already have could do
that.

> [1] right now how do we get the issue number of a committed patch?

There's no direct mapping.  You have to search by subject name.

-- 
Thanks,
Maxim

Reply via email to