git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 15, 2008, 18:41 UTC
Message-ID
<7vzlne9l49.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1218819643.6345.57.camel@cass-lpt>
Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> writes:
Show 9 quoted lines
> 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.

Previous: Guillaume Desmottes
Message 4 of 4 in “[BUG] git rebase is confuse if conflict resolution doesn't produce diff”
  1. Guillaume DesmottesAug 15, 2008
  2. Stephan BeyerAug 15, 2008
  3. Guillaume DesmottesAug 18, 2008
  4. Junio C HamanoAug 15, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.