summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Pratyush Yadav <me@yadavpratyush.com>2019-10-03 04:41:58 +0530
committerLibravatar Pratyush Yadav <me@yadavpratyush.com>2019-10-03 04:41:58 +0530
commit45ab460d4ad23e06f81a1cc9ed10efff6c612297 (patch)
tree32f5f3637ffd58c4b1fc132d07246c8af614d2e0
parentMerge branch 'py/git-git-extra-stuff' (diff)
parentgit-gui (Windows): use git-bash.exe if it is available (diff)
downloadtgif-45ab460d4ad23e06f81a1cc9ed10efff6c612297.tar.xz
Merge branch 'js/git-bash-if-available'
git-gui will now use git-bash instead of bash on Windows, if it is available. * js/git-bash-if-available: git-gui (Windows): use git-bash.exe if it is available
-rwxr-xr-xgit-gui.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/git-gui.sh b/git-gui.sh
index fd476b6999..20b8afe526 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2736,10 +2736,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]} {