]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-gui/git-gui.sh
Merge https://github.com/prati0100/git-gui
[thirdparty/git.git] / git-gui / git-gui.sh
index fd476b69993c68ddd58e274ae97e0f91c0086951..0d21f5688b37195f5d71eaaab2bc3aea054fdfe8 100755 (executable)
@@ -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]} {
@@ -3581,6 +3589,9 @@ $ui_diff tag conf d_s- \
 $ui_diff tag conf d< \
        -foreground orange \
        -font font_diffbold
+$ui_diff tag conf d| \
+       -foreground orange \
+       -font font_diffbold
 $ui_diff tag conf d= \
        -foreground orange \
        -font font_diffbold