git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Cc: git@vger.kernel.org
Subject: Re: [BUG] git rebase is confuse if conflict resolution doesn't produce diff
Date: Fri, 15 Aug 2008 20:24:39 +0200	[thread overview]
Message-ID: <20080815182439.GB23326@leksak.fem-net> (raw)
In-Reply-To: <1218819643.6345.57.camel@cass-lpt>

Hi,

Guillaume Desmottes wrote:
> 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
> 
> You get the following error:
> No changes - did you forget to use 'git add'?
> 
> git status is empty as the conflict was resolved.
> 
> A simple workaround is to add a dummy blank line in the conflicted file
> so the diff is not empty.

I think this is no bug, since you would generate an empty commit, i.e
a commit with no changes at all. Usually you do not want such commits.
So git rebase --skip is perhaps what you want.

Regards,
  Stephan

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F

  reply	other threads:[~2008-08-15 18:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15 17:00 [BUG] git rebase is confuse if conflict resolution doesn't produce diff Guillaume Desmottes
2008-08-15 18:24 ` Stephan Beyer [this message]
2008-08-18  9:10   ` Guillaume Desmottes
2008-08-15 18:41 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080815182439.GB23326@leksak.fem-net \
    --to=s-beyer@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=guillaume.desmottes@collabora.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).