diff options
| author | Pratyush Yadav <me@yadavpratyush.com> | 2023-08-24 16:46:29 +0200 |
|---|---|---|
| committer | Pratyush Yadav <me@yadavpratyush.com> | 2023-08-24 16:46:29 +0200 |
| commit | e25cbdf3576f07bda742a4f13d9380a815e43502 (patch) | |
| tree | 9e37956d3517a8d84184b154d0d2151f41a5aff8 /lib/shortcut.tcl | |
| parent | a5005ded43149a67290c9b8e83d585daf23716ef (diff) | |
| parent | b85c5a4ec66f18fdaa550fdf7801f48ebbc4292f (diff) | |
| download | git-e25cbdf3576f07bda742a4f13d9380a815e43502.tar.gz | |
Merge branch 'ml/cygwin-fixes'
Remove some code supporting ancient Cygwin Tcl/Tk versions. Also fix
exploring working directory and making desktop shortcuts on Cygwin.
* ml/cygwin-fixes:
git-gui - use mkshortcut on Cygwin
git-gui - use cygstart to browse on Cygwin
git-gui - remove obsolete Cygwin specific code
git gui Makefile - remove Cygwin modifications
Diffstat (limited to 'lib/shortcut.tcl')
| -rw-r--r-- | lib/shortcut.tcl | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/lib/shortcut.tcl b/lib/shortcut.tcl index 97d1d7aa02..674a41f5e0 100644 --- a/lib/shortcut.tcl +++ b/lib/shortcut.tcl @@ -27,13 +27,10 @@ proc do_windows_shortcut {} { } proc do_cygwin_shortcut {} { - global argv0 _gitworktree + global argv0 _gitworktree oguilib if {[catch { set desktop [exec cygpath \ - --windows \ - --absolute \ - --long-name \ --desktop] }]} { set desktop . @@ -48,19 +45,19 @@ proc do_cygwin_shortcut {} { set fn ${fn}.lnk } if {[catch { - set sh [exec cygpath \ - --windows \ - --absolute \ - /bin/sh.exe] - set me [exec cygpath \ - --unix \ - --absolute \ - $argv0] - win32_create_lnk $fn [list \ - $sh -c \ - "CHERE_INVOKING=1 source /etc/profile;[sq $me] &" \ - ] \ - [file normalize $_gitworktree] + set repodir [file normalize $_gitworktree] + set shargs {-c \ + "CHERE_INVOKING=1 \ + source /etc/profile; \ + git gui"} + exec /bin/mkshortcut.exe \ + --arguments $shargs \ + --desc "git-gui on $repodir" \ + --icon $oguilib/git-gui.ico \ + --name $fn \ + --show min \ + --workingdir $repodir \ + /bin/sh.exe } err]} { error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"] } |
