diff options
| author | Mark Levedahl <mlevedahl@gmail.com> | 2025-03-31 23:01:01 -0400 |
|---|---|---|
| committer | Johannes Sixt <j6t@kdbg.org> | 2025-04-01 18:12:13 +0200 |
| commit | 74571bff17986359170f7dcf135c9a21bbdce06e (patch) | |
| tree | a07eda3efde78388eb45093383cb6c5a112aa350 | |
| parent | gitk: override $PATH search only on Windows (diff) | |
| download | git-74571bff17986359170f7dcf135c9a21bbdce06e.tar.gz git-74571bff17986359170f7dcf135c9a21bbdce06e.zip | |
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 <mlevedahl@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
| -rwxr-xr-x | gitk | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 { |
