File tree Expand file tree Collapse file tree 2 files changed +24
-12
lines changed Expand file tree Collapse file tree 2 files changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -270,12 +270,10 @@ proc is_Windows {} {
270
270
proc is_Cygwin {} {
271
271
global _iscygwin
272
272
if {$_iscygwin eq {}} {
273
- if {$::tcl_platform(platform) eq {windows}} {
274
- if {[catch {set p [exec cygpath --windir]} err]} {
275
- set _iscygwin 0
276
- } else {
277
- set _iscygwin 1
278
- }
273
+ if {$::tcl_platform(platform) eq {windows} &&
274
+ (![info exists ::env(MSYSTEM)] ||
275
+ $::env(MSYSTEM) eq {MSYS})} {
276
+ set _iscygwin 1
279
277
} else {
280
278
set _iscygwin 0
281
279
}
@@ -2669,10 +2667,18 @@ if {![is_bare]} {
2669
2667
}
2670
2668
2671
2669
if {[ is_Windows] } {
2670
+ # Use /git-bash.exe if available
2671
+ set normalized [ file normalize $::argv0 ]
2672
+ regsub " /mingw../libexec/git-core/git-gui$" \
2673
+ $normalized " /git-bash.exe" cmdLine
2674
+ if {$cmdLine != $normalized && [ file exists $cmdLine ] } {
2675
+ set cmdLine [ list " Git Bash" $cmdLine &]
2676
+ } else {
2677
+ set cmdLine [ list " Git Bash" bash --login -l &]
2678
+ }
2672
2679
.mbar.repository add command \
2673
2680
-label [ mc " Git Bash" ] \
2674
- -command {eval exec [ auto_execok start] \
2675
- [ list " Git Bash" bash --login -l &] }
2681
+ -command {eval exec [ auto_execok start] $cmdLine }
2676
2682
}
2677
2683
2678
2684
if {[ is_Windows] || ![ is_bare] } {
Original file line number Diff line number Diff line change @@ -11,11 +11,17 @@ proc do_windows_shortcut {} {
11
11
if {[file extension $fn ] ne {.lnk}} {
12
12
set fn ${fn} .lnk
13
13
}
14
+ # Use /cmd/git-gui.exe if available
15
+ set normalized [file normalize $::argv0 ]
16
+ regsub "/mingw../libexec/git-core/git-gui$" \
17
+ $normalized "/cmd/git-gui.exe" cmdLine
18
+ if {$cmdLine != $normalized && [file exists $cmdLine ]} {
19
+ set cmdLine [list [file nativename $cmdLine ]]
20
+ } else {
21
+ set cmdLine [list [info nameofexecutable] $normalized ]
22
+ }
14
23
if {[catch {
15
- win32_create_lnk $fn [list \
16
- [info nameofexecutable] \
17
- [file normalize $::argv0 ] \
18
- ] \
24
+ win32_create_lnk $fn $cmdLine \
19
25
[file normalize $_gitworktree ]
20
26
} err]} {
21
27
error_popup [strcat [mc " Cannot write shortcut:" ] " \n\n $err " ]
You can’t perform that action at this time.
0 commit comments