Thread (5 messages) flat view 5 messages, 4 authors, 2026-02-09

Re: [PATCH v2] merge-file: honor merge.conflictStyle outside of a repository

From: Patrick Steinhardt <hidden>
Date: 2026-02-09 09:08:38

Possibly related (same subject, not in this thread)

On Sat, Feb 07, 2026 at 10:37:48PM +0100, Yannik Tausch wrote:
quoted hunk ↗ jump to hunk
diff --git a/builtin/merge-file.c b/builtin/merge-file.c
index 46775d0c79..f9de636884 100644
--- a/builtin/merge-file.c
+++ b/builtin/merge-file.c
@@ -95,12 +95,10 @@ int cmd_merge_file(int argc,
 	xmp.style = 0;
 	xmp.favor = 0;
 
-	if (startup_info->have_repository) {
-		/* Read the configuration file */
-		repo_config(the_repository, git_xmerge_config, NULL);
-		if (0 <= git_xmerge_style)
-			xmp.style = git_xmerge_style;
-	}
+	/* Read the configuration file */
+	repo_config(repo, git_xmerge_config, NULL);
+	if (0 <= git_xmerge_style)
+		xmp.style = git_xmerge_style;
 
 	argc = parse_options(argc, argv, prefix, options, merge_file_usage, 0);
 	if (argc != 3)
Makes sense. I was briefly wondering about error handling in the old/new
code, but unknown keys are already handled by `git_xmerge_config()`, and
we'd die in case we see one.

So this patch looks good to me overall, thanks!

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help