git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: <rsbecker@nexbridge.com>
Cc: "'Johannes Sixt'" <j6t@kdbg.org>,  <git@vger.kernel.org>
Subject: Re: [QUESTION] mergetool environment variables
Date: Sat, 13 Sep 2025 23:38:15 -0700	[thread overview]
Message-ID: <xmqq8qihk088.fsf@gitster.g> (raw)
In-Reply-To: <004101dc250d$18173950$4845abf0$@nexbridge.com> (rsbecker@nexbridge.com's message of "Sat, 13 Sep 2025 20:18:22 -0400")

<rsbecker@nexbridge.com> writes:

> Yes, it needs to be in the git install area. Adding export BASE export LOCAL, etc.,
> works to resolve the situation. I wonder whether that should be documented.

I am not a mergetool user, but I do not think that is how the thing
was intended to be used in the first place.

The documentation that may talk about variables BASE etc. (not
"environment variables") are meant for those who add their new tool
to the existing mergetool/difftool infrastructure, which means that
their tool's definition must be dot-sourceable just like any of
these tools defined in mergetools/ directory.  You'd add yours
there, mimicking what they do, and add a handful of shell functions
to be called.  git-mergetool--lib would then use

    . "$MERGE_TOOLS_DIR/${tool%[0-9]}"

inside its setup_tool function to read your definition.


  reply	other threads:[~2025-09-14  6:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-12 20:16 [QUESTION] mergetool environment variables rsbecker
2025-09-13  7:04 ` Johannes Sixt
2025-09-13 14:42   ` rsbecker
2025-09-13 21:03     ` Johannes Sixt
2025-09-14  0:18       ` rsbecker
2025-09-14  6:38         ` Junio C Hamano [this message]
2025-09-14 13:48         ` Phillip Wood
2025-09-15 15:35           ` D. Ben Knoble

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=xmqq8qihk088.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=rsbecker@nexbridge.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;
as well as URLs for NNTP newsgroup(s).