[Insight-developers] Failed to merge a gerrit patch
Matthew McCormick (thewtex)
matt at mmmccormick.com
Sun Aug 14 22:38:52 EDT 2011
On Sun, Aug 14, 2011 at 5:55 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> I cannot do a push after the cherry pick because gerrit reports that nothing
> has changed.
'git cherry-pick' says take a commit and merges it into the current
branch. If the HEAD of the current branch is the same as the parent
of the commit, then nothings changes. No 'git gerrit-push' is
required. If, however, master is advanced ahead of parent of the
commit, a merge is required. There may or may not be merge conflicts.
The cherry-picked commit has a different parent, and the code that
surrounds it is different. In this case, a 'git gerrit-push' is
required, as it should be. It is effectively re-basing on master.
>
> I can do a commit -amend and add a bogus change to the commit message and
> then successfully push.
This was not necessary in this case. A direct 'git gerrit-merge'
should have worked.
> I can live with this, but it is a change from the
> previous work flow. I avoid the checkout line because it often rebuilds too
> much stuff.
I think it is good to know when a rebase occurs, and to have builds to
verify that the rebase did not cause problems. The robots are
computers, not people -- they will not complain to much if they have a
little extra work ;-).
>
> Actually, I would prefer that the recent commit check be removed. I realize
> that it was adeed to prevent a bogur gerrit-merge, but I question how often
> that happened.
I am of the mind "It's a feature, not a bug."
Matt
More information about the Insight-developers
mailing list