From: Johannes Sixt Date: Mon, 11 Jan 2010 21:05:54 GMT Subject: Re: [PATCH 9/9] rerere forget path: forget recorded resolution Message-ID: <201001112205.54404.j6t@kdbg.org> In-Reply-To: <7v3a2cif04.fsf@alter.siamese.dyndns.org> On Montag, 11. Januar 2010, Junio C Hamano wrote: > Actually it is _very_ easy to fool rerere to do something totally > unexpected, and I have been thinking about using the similarity comparison > algorithm on the region outside the conflicted area between preimage and > thisimage and reject use of rerere. > > Try this in an empty directory. >[snip] > Now, immediately after this sequence, rerere will give you an disaster. Indeed. The problem here is that two entirely different resolutions are recorded for the same conflict hash *in one run of rerere*. The damage can be avoided if conflict hashes are not reused in do_plain_rerere (in the first loop). (Though, I'm currently not in the mood to look into this in more depth.) Of course, this does not mean that *both* conflicts can be resolved automatically when the merge is repeated. In my use-case this would have been desirable (and even your example would suggest it is, but that is not generally true). -- Hannes