From c5c32781c99bfa9d8b7c51b4a1ad66a9fa1e6bfe Mon Sep 17 00:00:00 2001 From: Mark Levedahl Date: Wed, 2 Apr 2025 11:23:03 -0400 Subject: [PATCH] git-gui: use [is_Windows], not bad _shellpath Commit 7d076d56757c (git-gui: handle shell script text filters when loading for blame, 2011-12-09) added open_cmd_pipe, with special handling for Windows detected by seeing that _shellpath does not point to an executable shell. That is bad practice, and is broken by the next commit that assures _shellpath is valid on all platforms. Fix this by using [is_Windows] as done for all Windows specific code. Signed-off-by: Mark Levedahl Signed-off-by: Johannes Sixt Signed-off-by: Taylor Blau --- git-gui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-gui.sh b/git-gui.sh index 2e079b6ab1..3135116169 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -543,7 +543,7 @@ proc is_shellscript {filename} { # scripts specifically otherwise just call the filter command. proc open_cmd_pipe {cmd path} { global env - if {![file executable [shellpath]]} { + if {[is_Windows]} { set exe [auto_execok [lindex $cmd 0]] if {[is_shellscript [lindex $exe 0]]} { set run [linsert [auto_execok sh] end -c "$cmd \"\$0\"" $path] -- 2.47.3