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

Re: [bug?] checkout -m doesn't work without a base version

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 8, 2011, 18:27 UTC
Message-ID
<7vvcpqj4vr.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4EDF1631.5090906@pcharlan.com>
Pete Harlan <pgit@pcharlan.com> writes:
> to "ours" and "theirs".  (The same thing happens in the 3-way merge
> case.)

That is entirely expected. "checkout -m" does not know or care _how_ the index came to the conflicted state and reproduces the three-way conflicted state in the file in the working tree solely from the contents of the index which records only what the common thing looked like (stage #1), what one side looked like (stage #2) and what the other side looked like (stage #3) before the mergy operation began, so there is no way for it to say "the other side came from foo/blah branch". There are even cases where the conflict originally came not from any branch (think "am -3").

Previous: Pete HarlanNext: Pete Harlan
Message 4 of 15 in “[bug?] checkout -m doesn't work without a base version”
  1. Pete HarlanDec 4, 2011
  2. Junio C HamanoDec 5, 2011
  3. Pete HarlanDec 7, 2011
  4. Junio C HamanoDec 8, 2011
  5. Pete HarlanDec 12, 2011
  6. Junio C HamanoDec 12, 2011
  7. t/t2023-checkout-m.sh: fix use of test_must_failÆvar Arnfjörð Bjarmason, Dec 20, 2011
  8. Junio C HamanoDec 20, 2011
  9. Michael SchubertDec 14, 2011
  10. Junio C HamanoDec 14, 2011
  11. Miles BaderDec 15, 2011
  12. Michael SchubertDec 15, 2011
  13. Andreas SchwabDec 15, 2011
  14. Junio C HamanoDec 15, 2011
  15. Ramsay JonesDec 16, 2011

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.