Skip to content

Commit d3fbd2a

Browse files
committed
Merge branch 'msys2-git-gui'
This topic branch addresses the bug where Git for Windows 2.x' Git GUI failed to generate a working shortcut via Repository>Create Desktop Shortcut. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 4df7567 + d5145b6 commit d3fbd2a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

git-gui/git-gui.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,10 +2715,18 @@ if {![is_bare]} {
27152715
}
27162716
27172717
if {[is_Windows]} {
2718+
# Use /git-bash.exe if available
2719+
set normalized [file normalize $::argv0]
2720+
regsub "/mingw../libexec/git-core/git-gui$" \
2721+
$normalized "/git-bash.exe" cmdLine
2722+
if {$cmdLine != $normalized && [file exists $cmdLine]} {
2723+
set cmdLine [list "Git Bash" $cmdLine &]
2724+
} else {
2725+
set cmdLine [list "Git Bash" bash --login -l &]
2726+
}
27182727
.mbar.repository add command \
27192728
-label [mc "Git Bash"] \
2720-
-command {eval exec [auto_execok start] \
2721-
[list "Git Bash" bash --login -l &]}
2729+
-command {eval exec [auto_execok start] $cmdLine}
27222730
}
27232731
27242732
if {[is_Windows] || ![is_bare]} {

0 commit comments

Comments
 (0)