git-gui: eliminate _search_exe
git-gui has _search_exe as needed to give the executable suffix (.exe) on Windows. But, the prior commit eliminated the only user of this variable. Delete it. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Mark Levedahl committed
Apr 5, 2025 at 08:00 UTC
f4b7ad5ab808ca733dbeede2c009faab0341b994
1 file changed
+3
-5
git-gui.sh
+3
-5
@@ -81,10 +81,8 @@ proc is_Cygwin {} {
81
82
if {[is_Windows]} {
83
set _path_sep {;}
84
- set _search_exe .exe
84
} else {
85
set _path_sep {:}
87
- set _search_exe {}
86
}
87
88
if {[is_Windows]} {
@@ -114,15 +112,15 @@ set env(PATH) [join $_search_path $_path_sep]
112
113
if {[is_Windows]} {
114
proc _which {what args} {
117
- global _search_exe _search_path
115
+ global _search_path
116
117
if {[lsearch -exact $args -script] >= 0} {
118
set suffix {}
121
- } elseif {[string match *$_search_exe [string tolower $what]]} {
119
+ } elseif {[string match *.exe [string tolower $what]]} {
120
# The search string already has the file extension
121
set suffix {}
122
} else {
125
- set suffix $_search_exe
123
+ set suffix .exe
124
}
125
126
foreach p $_search_path {