Skip to content

Commit c5c3278

Browse files
mark987ttaylorr
authored andcommitted
git-gui: use [is_Windows], not bad _shellpath
Commit 7d076d5 (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 <[email protected]> Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 37b9230 commit c5c3278

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-gui.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ proc is_shellscript {filename} {
543543
# scripts specifically otherwise just call the filter command.
544544
proc open_cmd_pipe {cmd path} {
545545
global env
546-
if {![file executable [shellpath]]} {
546+
if {[is_Windows]} {
547547
set exe [auto_execok [lindex $cmd 0]]
548548
if {[is_shellscript [lindex $exe 0]]} {
549549
set run [linsert [auto_execok sh] end -c "$cmd \"\$0\"" $path]

0 commit comments

Comments
 (0)