[vtk-developers] Gerrit: Change-Ids and merge commits

Chris Harris chris.harris at kitware.com
Mon Feb 6 16:19:24 EST 2012


Several developers have had trouble pushing branches to Gerrit that
contain merge commits. May of these where long running topic branches
that contained multiple merges from master. Merge commits should be
avoided if possible. They add unnecessary dependencies and complicates
the shape of history, see the following wiki entry for more
explanation:

http://public.kitware.com/Wiki/Git/Workflow/Topic#Urge_to_Merge

Anyway, these branches were rejected by Gerrit as the merge commits
did not contain Change-Ids. The Change-Ids where missing because the
git commit-msg hook used to add Change-Ids is not run for merge
commits. To resolve this a git prepare-commit-msg hook (which is run
for a merge commit) has been add to ensure Change-Ids are also added
to merge commits. To update your local hooks please run the following.


git checkout master
git pull
Utilities/SetupForDevelopment.sh


Regards,

Chris



More information about the vtk-developers mailing list