Merge branch 'jn/gitweb-test'
[gitweb.git] / git-gui / lib / blame.tcl
index 2137ec9684d0acdb386e6b50e1b41aa7705c9746..61e358f960ca949cac5664c67442b82d0afca65f 100644 (file)
@@ -460,7 +460,14 @@ method _load {jump} {
        }
        if {$commit eq {}} {
                if {$do_textconv ne 0} {
-                       set fd [open |[list $textconv $path] r]
+                       # Run textconv with sh -c "..." to allow it to
+                       # 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]
                }