[Insight-developers] Direct commits versus gerrit-merge
Marcus D. Hanwell
marcus.hanwell at kitware.com
Thu Dec 30 00:06:55 EST 2010
We might be able to add a hook. If you use the stage, then there is no
need to rebase, the hash will match and the Change-Id line will not be
necessary. So using the stage also negates the need for the Change-Id,
and makes the history clearer. We could require a Change-Id line as
the final line of the commit message, but it could still be an
incorrect change-id.
Hopefully this clears up what happened in this case, ideally once a
change is accepted then it should be pushed and merged unchanged (i.e.
no rebasing/further edits).
On Wed, Dec 29, 2010 at 11:55 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Actually, the reviewers should be on the lookout for this one.
>
> On Wed, Dec 29, 2010 at 11:54 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> This is not the first time this has happened. I remember doing it
>> myself at one time when pushing a topic patch to gerrit. Is there any
>> way we can prevent this with a pre-commit hook?
>>
>> On Wed, Dec 29, 2010 at 11:52 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>> Oh, I see. The Change-Id is not the last line in this commit message.
>>> It is second to last.
>>>
>>> On Wed, Dec 29, 2010 at 11:50 PM, Marcus D. Hanwell
>>> <marcus.hanwell at kitware.com> wrote:
>>>> It should be marked as merged if the Change-Id line is the final line
>>>> of the commit message.
>>>>
>>>> On Wed, Dec 29, 2010 at 11:37 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>>>> One more reason to do git gerrit-merge.
>>>>>
>>>>> I think the git topic on gerrit will not be automatically changed to
>>>>> merge status. You will have to mark it abandoned.
>>>>>
>>>>> We're all learning this new way of doing things.
>>>>>
>>>>> Bill
>>>>>
>>>>> On Wed, Dec 29, 2010 at 11:34 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>>>>> David,
>>>>>>
>>>>>> The proper way to move an approved topic from gerrit to master is with the
>>>>>> git gerrit-merge
>>>>>> command as described here:
>>>>>> http://www.itk.org/Wiki/ITK/Git/Develop
>>>>>>
>>>>>> You should not directly commit to master.
>>>>>>
>>>>>> BTW, the file Testing/Code/Algorithms/itkBresenhamLineTest.cxx:85:2:
>>>>>> warning: no newline at end of file
>>>>>>
>>>>>> I'm not sure what editor you use, but usually there is a setting to
>>>>>> guarantee an newline at the end of file. We used to have a commit
>>>>>> hook to prevent checkins that did not have a newline at the end of
>>>>>> file but it seems with git we don't have that.
>>>>>>
>>>>>> Bill
>>>>>>
>>>>> _______________________________________________
>>>>> Powered by www.kitware.com
>>>>>
>>>>> Visit other Kitware open-source projects at
>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>
>>>>> Kitware offers ITK Training Courses, for more information visit:
>>>>> http://kitware.com/products/protraining.html
>>>>>
>>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>>
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>>>
>>>>
>>>
>>
>
More information about the Insight-developers
mailing list