Re: [RFC/PATCH] merge: loosen overcautious "working file will be lost" check.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Oct 9, 2006, 22:47 UTC
- Message-ID
- <7vy7rp9kdz.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20061009172053.48882.qmail@web31804.mail.mud.yahoo.com>
Luben Tuikov <ltuikov@yahoo.com> writes:
Show 18 quoted lines
> I think this is a good thing. > > How about this case I've noticed in my trees: > > After branching out, a file is deleted, only to add > a different file with the same file name. > > Then any time I pull in from the trunk to merge, > merge fails with git-diff-files showing all 0's and the > file name in question. Picture: > > Branch B +-----------------M1----> > / / > C2 <-- git-add A / > / / > C1 <-- git-rm A / > / / > Trunk -----+-----------------+---->
Sorry I do not understand the picture; where is the common ancestor? If it is the left plus sign on the Trunk line, and you are talking about what happens when making the merge M1, then before C1 A did not exist (so Trunk tip which is the right plus sign on the Trunk line would not either), and the other head (tip of branch B you are pulling the trunk into) would have one already (from C2), so I would imagine it would be "one side adds while the other did not touch" (net effect since branch B forked from trunk is an addition of A, while Trunk did not do anything with respect to path A), so I do not see where any conflict can come from. Puzzled.