summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-gui.sh9
-rw-r--r--lib/blame.tcl9
2 files changed, 15 insertions, 3 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 8ade423eb4..0d5c5e389e 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -139,7 +139,14 @@ if {$_trace >= 0} {
}
proc shellpath {} {
- global _shellpath
+ global _shellpath env
+ if {[string match @@* $_shellpath]} {
+ if {[info exists env(SHELL)]} {
+ return $env(SHELL)
+ } else {
+ return /bin/sh
+ }
+ }
return $_shellpath
}
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 77656d3675..61e358f960 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -461,8 +461,13 @@ method _load {jump} {
if {$commit eq {}} {
if {$do_textconv ne 0} {
# Run textconv with sh -c "..." to allow it to
- # contain command + arguments.
- set fd [open |[list [shellpath] -c "$textconv \"\$0\"" $path] r]
+ # contain command + arguments. On windows, just
+ # call the filter command.
+ if {![file executable [shellpath]]} {
+ set fd [open |[linsert $textconv end $path] r]
+ } else {
+ set fd [open |[list [shellpath] -c "$textconv \"\$0\"" $path] r]
+ }
} else {
set fd [open $path r]
}