mirror of
https://github.com/git/git.git
synced 2026-02-04 15:04:45 +00:00
Merge pull request #492 from tomyy/issue-490
git-gui: Use /git-bash.exe if available
This commit is contained in:
@@ -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]} {
|
||||
|
||||
Reference in New Issue
Block a user