]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui: eliminate _search_exe
authorMark Levedahl <mlevedahl@gmail.com>
Sat, 5 Apr 2025 12:00:00 +0000 (08:00 -0400)
committerMark Levedahl <mlevedahl@gmail.com>
Mon, 21 Jul 2025 22:22:33 +0000 (18:22 -0400)
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>
git-gui.sh

index 9bc773d43c9145d4353cd2185fdda2f7fbd8f2ed..b361d8c8ae63cc03684e66d03ba45ccc7830120c 100755 (executable)
@@ -81,10 +81,8 @@ proc is_Cygwin {} {
 
 if {[is_Windows]} {
        set _path_sep {;}
-       set _search_exe .exe
 } else {
        set _path_sep {:}
-       set _search_exe {}
 }
 
 if {[is_Windows]} {
@@ -114,15 +112,15 @@ set env(PATH) [join $_search_path $_path_sep]
 
 if {[is_Windows]} {
        proc _which {what args} {
-               global _search_exe _search_path
+               global _search_path
 
                if {[lsearch -exact $args -script] >= 0} {
                        set suffix {}
-               } elseif {[string match *$_search_exe [string tolower $what]]} {
+               } elseif {[string match *.exe [string tolower $what]]} {
                        # The search string already has the file extension
                        set suffix {}
                } else {
-                       set suffix $_search_exe
+                       set suffix .exe
                }
 
                foreach p $_search_path {