Re: [PATCH] modify/delete conflict resolution overwrites untracked file
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 15, 2008, 01:03 UTC
- Message-ID
- <7v63lm1c76.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20081215004651.GA16205@localhost>
Clemens Buchacher <drizzd@aon.at> writes:
Show 11 quoted lines
> On Wed, Dec 10, 2008 at 09:12:59PM +0100, Clemens Buchacher wrote: >> If a file was removed in HEAD, but modified in MERGE_HEAD, recursive merge >> will result in a "CONFLICT (delete/modify)". If the (now untracked) file >> already exists and was not added to the index, it is overwritten with the >> conflict resolution contents. > > The following patch fixes the problem described above, but it also breaks > t6023-merge-rename-nocruft.sh, which tries to merge "A" renamed to "B" in > HEAD and "A" modified in MERGE_HEAD, while ignoring an untracked file "A" in > the working tree. If we want to be able to do this, we have to handle the > other case after rename detection.
If the breakage is in merge-recursive but not in merge-resolve, my gut feeling is that we should not be touching unpack-trees at all. With luck I may be able to find some time to take a look at this myself but right now we are entertaining a guest, so....