Skip to content

Commit 3374789

Browse files
committed
Merge branch 'pt/git4win-mods' of https://github.com/patthoyts/git-gui
Signed-off-by: Johannes Schindelin <[email protected]>
2 parents e408b09 + 65c9476 commit 3374789

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

git-gui/git-gui.sh

+4
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ proc is_Cygwin {} {
275275
set _iscygwin 0
276276
} else {
277277
set _iscygwin 1
278+
# Handle MSys2 which is only cygwin when MSYSTEM is MSYS.
279+
if {[info exists ::env(MSYSTEM)] && $::env(MSYSTEM) ne "MSYS"} {
280+
set _iscygwin 0
281+
}
278282
}
279283
} else {
280284
set _iscygwin 0

git-gui/lib/shortcut.tcl

+7-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ proc do_windows_shortcut {} {
1111
if {[file extension $fn] ne {.lnk}} {
1212
set fn ${fn}.lnk
1313
}
14+
# Use git-gui.exe if available (ie: git-for-windows)
15+
set cmdLine [auto_execok git-gui.exe]
16+
if {$cmdLine eq {}} {
17+
set cmdLine [list [info nameofexecutable] \
18+
[file normalize $::argv0]]
19+
}
1420
if {[catch {
15-
win32_create_lnk $fn [list \
16-
[info nameofexecutable] \
17-
[file normalize $::argv0] \
18-
] \
21+
win32_create_lnk $fn $cmdLine \
1922
[file normalize $_gitworktree]
2023
} err]} {
2124
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]

0 commit comments

Comments
 (0)