summaryrefslogtreecommitdiff
path: root/git-gui.sh
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 /git-gui.sh
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 'git-gui.sh')
-rwxr-xr-xgit-gui.sh9
1 files changed, 8 insertions, 1 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
}