Skip to content

Commit f4b7ad5

Browse files
committed
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 <[email protected]>
1 parent eaca720 commit f4b7ad5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

git-gui.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,8 @@ proc is_Cygwin {} {
8181

8282
if {[is_Windows]} {
8383
set _path_sep {;}
84-
set _search_exe .exe
8584
} else {
8685
set _path_sep {:}
87-
set _search_exe {}
8886
}
8987

9088
if {[is_Windows]} {
@@ -114,15 +112,15 @@ set env(PATH) [join $_search_path $_path_sep]
114112
115113
if {[is_Windows]} {
116114
proc _which {what args} {
117-
global _search_exe _search_path
115+
global _search_path
118116
119117
if {[lsearch -exact $args -script] >= 0} {
120118
set suffix {}
121-
} elseif {[string match *$_search_exe [string tolower $what]]} {
119+
} elseif {[string match *.exe [string tolower $what]]} {
122120
# The search string already has the file extension
123121
set suffix {}
124122
} else {
125-
set suffix $_search_exe
123+
set suffix .exe
126124
}
127125
128126
foreach p $_search_path {

0 commit comments

Comments
 (0)