public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Yannik Tausch <dev@ytausch.de>
Cc: git@vger.kernel.org,
	 Manuel Lerchner <manuel.lerchner@quantco.com>,
	Yannik Tausch <yannik.tausch@quantco.com>
Subject: Re: [DOC] merge-file: document that merge.conflictStyle requires a repository
Date: Thu, 05 Feb 2026 11:11:51 -0800	[thread overview]
Message-ID: <xmqq4invm2dk.fsf@gitster.g> (raw)
In-Reply-To: <48B1AA62-D7FF-439E-B770-1127E1EE0E79@ytausch.de> (Yannik Tausch's message of "Thu, 5 Feb 2026 16:06:04 +0100")

Yannik Tausch <dev@ytausch.de> 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.

  reply	other threads:[~2026-02-05 19:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 15:06 [DOC] merge-file: document that merge.conflictStyle requires a repository Yannik Tausch
2026-02-05 19:11 ` Junio C Hamano [this message]
2026-02-05 20:27   ` [PATCH] merge-file: honor merge.conflictStyle outside of " Yannik Tausch
2026-02-05 20:44     ` Junio C Hamano
2026-02-05 20:51     ` Kristoffer Haugsbakk
2026-02-05 21:55       ` [PATCH v2] " Yannik Tausch
2026-02-06 21:53         ` Junio C Hamano
2026-02-07 21:28           ` Yannik Tausch
2026-02-07 21:37             ` Yannik Tausch
2026-02-07 21:47               ` Kristoffer Haugsbakk
2026-02-09  9:08               ` Patrick Steinhardt
2026-02-09 16:13                 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq4invm2dk.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=dev@ytausch.de \
    --cc=git@vger.kernel.org \
    --cc=manuel.lerchner@quantco.com \
    --cc=yannik.tausch@quantco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox