summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2010-08-07 20:32:13 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2010-08-12 21:37:32 +0100
commitd5257fb3c1decc1eff296a0ae2afbcaee28d0f2c (patch)
treeb727937d3c7d397b33512471407089ae7af3a612 /lib
parent62f9a632c819bd53a5b7dbe40409ab086a4bce10 (diff)
downloadgit-d5257fb3c1decc1eff296a0ae2afbcaee28d0f2c.tar.xz
git-gui: handle textconv filter on Windows and in development
When developing/testing we run git-gui.sh directly and the makefile configured variables are not properly set. Configure the new shellpath accessor to handle this case. On Windows we may not find the shell so in this case revert to simply executing the filter command without the shell intermediate. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/blame.tcl9
1 files changed, 7 insertions, 2 deletions
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]
}