Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [BUG] git rebase is confuse if conflict resolution doesn't produce diff

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:10

Guillaume Desmottes [off-list ref] writes:
To reproduce:
- Rebase a branch "foo" on a branch "bar" in a way that there is a
conflict that you have to manually resolve.
- Run git diff and see the conflict
- Edit the conflicted file and remove all the conflicting bits (that
could be a valid resolution of the conflict)
- Now git diff produces an empty diff
- git add $CONFLICTED_FILE  as you have resolve the conflict
- git rebase --continue
I think you would need a bit more than that to trigger this "behaviour".
Your resolution needs to be such that it is identical to the HEAD where
the rebased change is applied to, iow, among the series of commits, the
final effect chosen by you from this particular one is not to do
anything.  So, not just "Now git diff produces an empty diff" in the above
sequence, which merely means that the three-way --cc diff between the
conflicted parties are resolved by taking from one side, after that "git
add", "git diff HEAD" will have to be empty, for you to see the message.

In essence, the final effect chosen by you is to skip this commit.  You
might want to say "git rebase --skip" here if that is the case.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help