]> git.ipfire.org Git - thirdparty/git.git/commit
git-gui: avoid auto_execok for git-bash menu item
authorMark Levedahl <mlevedahl@gmail.com>
Wed, 2 Apr 2025 21:37:27 +0000 (17:37 -0400)
committerTaylor Blau <me@ttaylorr.com>
Fri, 23 May 2025 21:04:23 +0000 (17:04 -0400)
commit411cd493cb9998c2ba1c17dd98c3d3d4b121a1dd
tree7e842480746fc117a6bfe7e74a5784a5edd18036
parent2c66188b123795e4083594ee682dcf012540bee2
git-gui: avoid auto_execok for git-bash menu item

On Windows, git-gui offers to open a git-bash session for the current
repository from the menu, but uses [auto_execok start] to get the
command to actually run that shell.

The code for auto_execok, in /usr/share/tcl8.6/tcl.init, has 'start' in
the 'shellBuiltins' list for cmd.exe on Windows: as a result,
auto_execok does not actually search for start, meaning this usage is
technically ok with auto_execok now.  However, leaving this use of
auto_execok in place will just induce confusion about why a known unsafe
function is being used on Windows. Instead, let's switch to using our
known safe _which function that looks only in $PATH, excluding the
current working directory.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
git-gui.sh