[DOC] merge-file: document that merge.conflictStyle requires a repository
- From
Yannik Tausch <dev@ytausch.de>
- Date
- Feb 5, 2026, 15:06 UTC
- Message-ID
- <48B1AA62-D7FF-439E-B770-1127E1EE0E79@ytausch.de>
Hi,
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?
Something like adding to the --diff3 option description:
When run inside a repository, the `merge.conflictStyle` configuration variable can be used as a default for this option.
Thanks,
Yannik Tausch