Re: [PATCH 39/48] merge-recursive: Fix rename/rename(1to2) resolution for virtual merge base
- From
Elijah Newren <newren@gmail.com>
- Date
- Aug 8, 2011, 22:58 UTC
- Message-ID
- <CABPp-BEM6G4E7mf6280S6vdT-2UDDiKdfXtYS451s--YYO9wGA@mail.gmail.com>
- In-Reply-To
- <7vhb6aqdw7.fsf@alter.siamese.dyndns.org>
On Mon, Jul 25, 2011 at 2:55 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Elijah Newren <newren@gmail.com> 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. :-)