Re: [PATCH] rerere: fix for merge.conflictstyle
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 30, 2014, 14:04 UTC
- Message-ID
- <xmqqy4ymhq0l.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20140430060835.GA21698@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 19 quoted lines
> I could not reproduce the problem with a trivial case, and rerere > specifically tries to handle the differences between "merge" and "diff3" > styles by throwing away the base content between "|" and "=" lines. > However, I wonder if it could still miss a match in some cases because > the "merge" style uses XDL_MERGE_ZEALOUS, whereas diff3 bumps it > down to XDL_MERGE_EAGER, which could lead to a slightly different > preimage. > > If so, I think this points to a slightly more pervasive problem in > "rerere", then: data recorded under one merge level might not be usable > later (whether for "rerere forget" or for actually applying a > resolution). > ... > > So given all of the "hopefully rare" statements above and the complexity > of the complete solution, it's probably not worth pursuing. In which > case your patch seems like the best we can do. At least it covers the > more common case when you have set merge.conflictstyle but _didn't_ > change it since the postimage was recorded.
Thanks for a fix, Felipe, and thanks for a more detailed discussion, Peff. I think I saw the exact same symptom in "forget" the other day, but was too busy to pursue it at that moment.