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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 9, 2026, 16:13 UTC
Message-ID
<xmqq1pit7v3v.fsf@gitster.g>
In-Reply-To
<aYmkCLbhZPPjKqNK@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 30 quoted lines
> On Sat, Feb 07, 2026 at 10:37:48PM +0100, Yannik Tausch wrote:
>> 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
Yeah, looking good.  Thanks, both of you.
Previous: Patrick Steinhardt
Message 12 of 12 in “[DOC] merge-file: document that merge.conflictStyle requires a repository”
  1. Yannik TauschFeb 5, 2026
  2. Junio C HamanoFeb 5, 2026
  3. merge-file: honor merge.conflictStyle outside of a repositoryYannik Tausch, Feb 5, 2026
  4. Junio C HamanoFeb 5, 2026
  5. Kristoffer HaugsbakkFeb 5, 2026
  6. Yannik TauschFeb 5, 2026
  7. Junio C HamanoFeb 6, 2026
  8. Yannik TauschFeb 7, 2026
  9. merge-file: honor merge.conflictStyle outside of a repositoryYannik Tausch, Feb 7, 2026
  10. Kristoffer HaugsbakkFeb 7, 2026
  11. Patrick SteinhardtFeb 9, 2026
  12. Junio C HamanoFeb 9, 2026

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.