Skip to content

Commit 74571bf

Browse files
mark987j6t
authored andcommitted
gitk: _search_exe is no longer needed
The _search_exe variable allows specifying the suffix used for executables, typically {} on unix, .exe on Windows. But, the override code is now used only on Windows, so _search_exe is no longer needed. Eliminate it. Signed-off-by: Mark Levedahl <[email protected]> Signed-off-by: Johannes Sixt <[email protected]>
1 parent 1925c29 commit 74571bf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gitk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ proc is_Windows {} {
2727
if {[is_Windows]} {
2828
set _search_path {}
2929
proc _which {what args} {
30-
global env _search_exe _search_path
30+
global env _search_path
3131

3232
if {$_search_path eq {}} {
3333
set gitguidir [file dirname [info script]]
@@ -37,13 +37,12 @@ if {[is_Windows]} {
3737
# Skip empty `PATH` elements
3838
set _search_path [lsearch -all -inline -not -exact \
3939
$_search_path ""]
40-
set _search_exe .exe
4140
}
4241
4342
if {[lsearch -exact $args -script] >= 0} {
4443
set suffix {}
4544
} else {
46-
set suffix $_search_exe
45+
set suffix .exe
4746
}
4847
4948
foreach p $_search_path {

0 commit comments

Comments
 (0)