[Insight-developers] Just when I thought I understood gerrit

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Nov 8 15:25:14 EST 2010


On Mon, Nov 8, 2010 at 2:45 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Marcus,
>
> I tried to push a patch to an existing topic. Here is what I did:
>
> 1) git fetch http://review.source.kitware.com/p/ITK
> refs/changes/02/302/2 && git checkout FETCH_HEAD -b
> ConstShapedNeighborhoodIterator-ExposeSuperclass-Methods
>
> 2) Edited file, compiled.
>
> 3) git commit -m "BUG: Misnamed typedef."
> Testing/Code/Common/itkConstShapedNeighborhoodIteratorTest.cxx
>
> 4) git rebase -i HEAD~2
>   Changed commit message. Picked first commit, squashed second
> commit. Retained first ChangeId.
>
> 5) git gerrit-push
>
> I get a new entry on gerrit, rather that a patch to the existing one.
>
> I swear I have done this several times. Even once to the topic I'm
> trying to patch.
> http://review.source.kitware.com/#change,302
>
> You will see several abandoned topics that show my attempts.
>
> Where did I go wrong?
>
The Change-Id line *must* be the last line of the commit message. You
put something after the Change-Id line (BUG: Misnamed typedef.) If you
simply move that up to before the Change-Id line then it would work.
Gerrit only uses the final line of the commit message to scan for
Change-Id lines.

Marcus


More information about the Insight-developers mailing list