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

Re: [QUESTION] mergetool environment variables

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 14, 2025, 06:38 UTC
Message-ID
<xmqq8qihk088.fsf@gitster.g>
In-Reply-To
<004101dc250d$18173950$4845abf0$@nexbridge.com>
<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.
Previous: rsbecker@nexbridge.comNext: Phillip Wood
Message 6 of 8 in “[QUESTION] mergetool environment variables”
  1. rsbecker@nexbridge.comSep 12, 2025
  2. Johannes SixtSep 13, 2025
  3. rsbecker@nexbridge.comSep 13, 2025
  4. Johannes SixtSep 13, 2025
  5. rsbecker@nexbridge.comSep 14, 2025
  6. Junio C HamanoSep 14, 2025
  7. Phillip WoodSep 14, 2025
  8. D. Ben KnobleSep 15, 2025

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.