Skip to content

Commit

Permalink
Merge pull request #492 from tomyy/issue-490
Browse files Browse the repository at this point in the history
git-gui: Use /git-bash.exe if available
  • Loading branch information
dscho committed Oct 19, 2015
2 parents 98a7224 + 076a736 commit d668187
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions git-gui/git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2667,10 +2667,18 @@ if {![is_bare]} {
}
if {[is_Windows]} {
# Use /git-bash.exe if available
set normalized [file normalize $::argv0]
regsub "/mingw../libexec/git-core/git-gui$" \
$normalized "/git-bash.exe" cmdLine
if {$cmdLine != $normalized && [file exists $cmdLine]} {
set cmdLine [list "Git Bash" $cmdLine &]
} else {
set cmdLine [list "Git Bash" bash --login -l &]
}
.mbar.repository add command \
-label [mc "Git Bash"] \
-command {eval exec [auto_execok start] \
[list "Git Bash" bash --login -l &]}
-command {eval exec [auto_execok start] $cmdLine}
}
if {[is_Windows] || ![is_bare]} {
Expand Down

0 comments on commit d668187

Please sign in to comment.