Skip to content

Commit

Permalink
Merge branch 'pt/git4win-mods' of https://github.com/patthoyts/git-gui
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Oct 4, 2016
2 parents e408b09 + 65c9476 commit 3374789
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions git-gui/git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions git-gui/lib/shortcut.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 3374789

Please sign in to comment.