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

Re: [DOC] merge-file: document that merge.conflictStyle requires a repository

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 5, 2026, 19:11 UTC
Message-ID
<xmqq4invm2dk.fsf@gitster.g>
In-Reply-To
<48B1AA62-D7FF-439E-B770-1127E1EE0E79@ytausch.de>
Yannik Tausch <dev@ytausch.de> writes:
Show 11 quoted lines
> We noticed that `git merge-file` only respects the `merge.conflictStyle`
> configuration when run inside a repository. Outside a repository, the
> setting is ignored and only the `--diff3`/`--zdiff3` flags work.
>
> Looking at the history, this appears to be intentional since b541248467
> ("merge.conflictstyle: choose between merge and diff3 -m styles", 2008),
> which explicitly gates config reading on being inside a repository.
>
> This behavior surprised me, and I couldn't find it documented anywhere.
> Would a small documentation patch to git-merge-file.txt be welcome,
> noting that the config is only read when inside a repository?

Or even better, teach the command to read (limited set of) configuration files.

By definition, you cannot read from per-repository configuration file when working outside a repository, but these days we let our commands read configuration from system and personal configuration files, I think. Back in 2008, it is understandable we couldn't.

Previous: Yannik TauschNext: Yannik Tausch
Message 2 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.