From: Phillip Wood Date: Sun, 14 Sep 2025 13:48:45 GMT Subject: Re: [QUESTION] mergetool environment variables Message-ID: In-Reply-To: <004101dc250d$18173950$4845abf0$@nexbridge.com> Hi Randall On 14/09/2025 01:18, rsbecker@nexbridge.com wrote: > On September 13, 2025 5:04 PM, Johannes Sixt wrote: >> To: rsbecker@nexbridge.com >> Cc: git@vger.kernel.org >> Subject: Re: [QUESTION] mergetool environment variables >> >> Am 13.09.25 um 16:42 schrieb rsbecker@nexbridge.com: >>> Let me try to infer what is happening and please correct me if my >>> assumptions are wrong: >> I'm sorry to say that I can't help. I tried to disentangle what is going on, but this >> stuff is far too convoluted to be understood in a few minutes. I cannot tell if it is >> possible to write a mergetool that is not installed with Git. >> >> I would just copy one of the existing tool scripts and run `make install` from the Git >> source directory. > > 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. Looking at t7610-mergetool.sh I think you can use mergetool..cmd to call a user defined merge tool. The value of the config variable is eval'd in the shell so if you run git config mergetool.my-tool.cmd 'my-tool "$BASE" "$LOCAL" "$REMOTE"' then git mergetool --tool=my-tool will run my-tool on each unmerged file Thanks Phillip