summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 62f9a63)
raw | patch | inline | side by side (parent: 62f9a63)
author | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Sat, 7 Aug 2010 19:32:13 +0000 (20:32 +0100) | ||
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Thu, 12 Aug 2010 20:37:32 +0000 (21:37 +0100) |
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>
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>
git-gui.sh | patch | blob | history | |
lib/blame.tcl | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 8ade423eb46006025e56ee68e49230a8e8efb579..0d5c5e389e53dde25b6022321bb7c548d59a8d8d 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
}
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 77656d3675c5c128eafe3667d5fcb95e38559b9f..61e358f960ca949cac5664c67442b82d0afca65f 100644 (file)
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
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]
}