]> git.ipfire.org Git - thirdparty/git.git/commitdiff
gitk: _search_exe is no longer needed
authorMark Levedahl <mlevedahl@gmail.com>
Tue, 1 Apr 2025 03:01:01 +0000 (23:01 -0400)
committerJohannes Sixt <j6t@kdbg.org>
Tue, 1 Apr 2025 16:12:13 +0000 (18:12 +0200)
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 <mlevedahl@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
gitk

diff --git a/gitk b/gitk
index a22657bc8e7ab92407b48f4238e56991480b7a6c..899b51ca557669e346b8c3320b717953120d09f1 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -27,7 +27,7 @@ proc is_Windows {} {
 if {[is_Windows]} {
     set _search_path {}
     proc _which {what args} {
-        global env _search_exe _search_path
+        global env _search_path
 
         if {$_search_path eq {}} {
             set gitguidir [file dirname [info script]]
@@ -37,13 +37,12 @@ if {[is_Windows]} {
             # Skip empty `PATH` elements
             set _search_path [lsearch -all -inline -not -exact \
                 $_search_path ""]
-            set _search_exe .exe
         }
 
         if {[lsearch -exact $args -script] >= 0} {
             set suffix {}
         } else {
-            set suffix $_search_exe
+            set suffix .exe
         }
 
         foreach p $_search_path {