From: Elijah Newren Date: Mon, 08 Aug 2011 22:58:20 GMT Subject: Re: [PATCH 39/48] merge-recursive: Fix rename/rename(1to2) resolution for virtual merge base Message-ID: In-Reply-To: <7vhb6aqdw7.fsf@alter.siamese.dyndns.org> On Mon, Jul 25, 2011 at 2:55 PM, Junio C Hamano wrote: > Elijah Newren writes: >> +             update_file(o, 0, mfi.sha, mfi.mode, src); >> +             remove_file_from_cache(ren1_dst); >> +             remove_file_from_cache(ren2_dst); > > ... the use of "src" here is taking a "middle ground" and punting on > resolving the conflicting opinions of both branches for the outer merge to > resolve. I think that is a sensible thing to do. > > The rename destinations of both branches are removed. What happens if > ren1_dst (the path one branch wanted to rename src to) were added by the > other branch (which wanted to rename src to ren2_dst), causing rename/add > conflict between branches (i.e. not the one you worry about in the above > FIXME which is about one branch renaming src to ren1_dst while adding an > unrelated content to src)? You found another bug; this time one that was already present in git rather than having been introduced by my series (the remove_file_from_cache() calls were already present, I just moved them around a little bit). I have a testcase that exposes this new bug now. Good catch. :-)