Thread (4 messages) flat view 4 messages, 3 authors, 2026-02-05

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

From: Junio C Hamano <hidden>
Date: 2026-02-05 19:11:54

Possibly related (same subject, not in this thread)

Yannik Tausch [off-list ref] writes:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help