rerere: fix for merge.conflictstyle
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 30 Apr 2014 04:08:29 +0000 (23:08 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Apr 2014 17:30:02 +0000 (10:30 -0700)
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, due to the
XDL_MERGE_* option differences among the codepaths.

The fix is to call git_xmerge_config() so that git_xmerge_style is set
properly and the diffs match.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rerere.c
index 4e51addb3e135465bdb728bb00c5dc3dd53b7c51..98eb8c5404914e4046fdb886866b611351deeacf 100644 (file)
@@ -60,6 +60,8 @@ int cmd_rerere(int argc, const char **argv, const char *prefix)
 
        argc = parse_options(argc, argv, prefix, options, rerere_usage, 0);
 
+       git_config(git_xmerge_config, NULL);
+
        if (autoupdate == 1)
                flags = RERERE_AUTOUPDATE;
        if (autoupdate == 0)