From: Johannes Sixt Date: Sat, 13 Sep 2025 07:04:50 GMT Subject: Re: [QUESTION] mergetool environment variables Message-ID: In-Reply-To: <074901dc2422$2039a910$60acfb30$@nexbridge.com> Am 12.09.25 um 22:16 schrieb rsbecker@nexbridge.com: > I am trying to integrate a custom mergetool with a shell wrapper. > What I get from the online help is the following description referring > to the command and environment variables. > > mergetool..cmd > Specify the command to invoke the specified merge tool. > The specified command is evaluated in shell with the > following variables available: BASE is the name of a Take note: this talks about "variables", not "environment variables". > temporary file containing the common base of the files > to be merged, if available; LOCAL is the name of a > temporary file containing the contents of the file on > the current branch; REMOTE is the name of a temporary > file containing the contents of the file from the branch > being merged; MERGED contains the name of the file > to which the merge tool should write the results of a > successful merge. > > When I try to use this from a shell, simply with: > #!/bin/sh > env > exit 1 > > the described environment variables: BASE, LOCAL, > REMOTE, and MERGED, are not present. Look at the scripts in the directory mergetools/ and note that they are only (large) shell code fragements without a shbang line. They are not even executable. -- Hannes