From: Felipe Contreras Date: Wed, 30 Apr 2014 06:49:18 GMT Subject: Re: [PATCH] rerere: fix for merge.conflictstyle Message-ID: <53609cee92532_4c3af672f0f4@nysa.notmuch> In-Reply-To: <20140430060835.GA21698@sigill.intra.peff.net> Jeff King wrote: > On Tue, Apr 29, 2014 at 11:08:29PM -0500, Felipe Contreras wrote: > > > If we use a different conflict style `git rerere forget` is not able to > > find the matching conflict SHA-1 because the diff generated is actually > > different from what `git merge` generated. > > Can you show an example or test case? % git clone https://github.com/felipec/git % git config merge.conflictstyle diff3 % git checkout master % git merge --no-ff origin/fc/branch/nice-verbose % git merge --no-ff origin/fc/publish # fix conflicts as per -Xtheir strategy % git commit % git rerere forget builtin/branch.c error: no remembered resolution for builtin/branch.c > 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. That's probably it. -- Felipe Contreras