git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pete Harlan <pgit@pcharlan.com>
To: git@vger.kernel.org
Subject: [bug?] checkout -m doesn't work without a base version
Date: Sun, 04 Dec 2011 14:31:49 -0800	[thread overview]
Message-ID: <4EDBF4D5.6030908@pcharlan.com> (raw)

Hi,

If during a merge I've resolved conflicts in foo.c but want to start
over with foo.c to resolve them differently, I can say "git checkout
-m foo.c" to restore it to its un-resolved state.

But this only works if there's a base version; if foo.c was added in
each branch, we get:

   error: path 'foo.c' does not have all three versions

Git didn't need all three versions to create the original conflicted
file, so why would it need them to recreate it?

(The message is the same if I explicitly tell Git I don't want diff3
via "git checkout --conflict=merge foo.c".)

If this is considered a bug worth fixing I'll write a test that it
fails; if it's expected behavior I think the docs should mention
that.

Thanks,

Pete Harlan
pgit@pcharlan.com

             reply	other threads:[~2011-12-04 22:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-04 22:31 Pete Harlan [this message]
2011-12-05 18:58 ` [bug?] checkout -m doesn't work without a base version Junio C Hamano
2011-12-07  7:30   ` Pete Harlan
2011-12-08 18:27     ` Junio C Hamano
2011-12-12  1:48       ` Pete Harlan
2011-12-12  5:29         ` Junio C Hamano
2011-12-20 20:37     ` [PATCH] t/t2023-checkout-m.sh: fix use of test_must_fail Ævar Arnfjörð Bjarmason
2011-12-20 21:23       ` Junio C Hamano
2011-12-14 10:19   ` [bug?] checkout -m doesn't work without a base version Michael Schubert
2011-12-14 17:54     ` Junio C Hamano
2011-12-15  4:20       ` Miles Bader
2011-12-15 10:11         ` Michael Schubert
2011-12-15 10:42       ` Andreas Schwab
2011-12-15 17:36         ` Junio C Hamano
2011-12-16 22:38           ` Ramsay Jones

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=4EDBF4D5.6030908@pcharlan.com \
    --to=pgit@pcharlan.com \
    --cc=git@vger.kernel.org \
    /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).