summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2016-10-03 23:30:32 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2016-10-03 23:30:32 +0100
commitc7fb7bfa114323a6608a0f40aeee453b66406287 (patch)
treef91113b0116d759d1ebce4395ac05d34b1bede2d
parent408c2120e02cf2a96cd44c69fe3baf406d4de157 (diff)
parentf110c46902859832f798fc6777ac6bd0e661804a (diff)
downloadgit-c7fb7bfa114323a6608a0f40aeee453b66406287.tar.gz
Merge branch 'pt/git4win-mods' into pu
-rwxr-xr-xgit-gui.sh4
-rw-r--r--lib/shortcut.tcl11
2 files changed, 11 insertions, 4 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 1ed51857e9..b097c8c927 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -275,6 +275,10 @@ proc is_Cygwin {} {
set _iscygwin 0
} else {
set _iscygwin 1
+ # Handle MSys2 which is only cygwin when MSYSTEM is MSYS.
+ if {[info exists ::env(MSYSTEM)] && $::env(MSYSTEM) ne "MSYS"} {
+ set _iscygwin 0
+ }
}
} else {
set _iscygwin 0
diff --git a/lib/shortcut.tcl b/lib/shortcut.tcl
index 78878ef89d..39d23f96df 100644
--- a/lib/shortcut.tcl
+++ b/lib/shortcut.tcl
@@ -11,11 +11,14 @@ proc do_windows_shortcut {} {
if {[file extension $fn] ne {.lnk}} {
set fn ${fn}.lnk
}
+ # Use git-gui.exe if available (ie: git-for-windows)
+ set cmdLine [auto_execok git-gui.exe]
+ if {$cmdLine eq {}} {
+ set cmdLine [list [info nameofexecutable] \
+ [file normalize $::argv0]]
+ }
if {[catch {
- win32_create_lnk $fn [list \
- [info nameofexecutable] \
- [file normalize $::argv0] \
- ] \
+ win32_create_lnk $fn $cmdLine \
[file normalize $_gitworktree]
} err]} {
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]