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").