git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] rerere: fix for merge.conflictstyle

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 30, 2014, 04:08 UTC
Message-ID
<1398830909-24680-1-git-send-email-felipe.contreras@gmail.com>

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.

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>
---
 builtin/rerere.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/builtin/rerere.c b/builtin/rerere.c
index 4e51add..98eb8c5 100644
--- a/builtin/rerere.c
+++ b/builtin/rerere.c
@@ -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)
-- 
1.9.2+fc1.10.gc7d6c45.dirty
Next: Jeff King
Message 1 of 4 in “rerere: fix for merge.conflictstyle”
  1. rerere: fix for merge.conflictstyleFelipe Contreras, Apr 30, 2014
  2. Jeff KingApr 30, 2014
  3. Felipe ContrerasApr 30, 2014
  4. Junio C HamanoApr 30, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.