summaryrefslogtreecommitdiff
path: root/contrib/gitview
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-02-22 11:47:20 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-02-22 11:47:20 (GMT)
commitd27d5b3c5b97ca30dfc5c448dc8cdae914131051 (patch)
tree2dd596f509cc398e5e8f28f014852d3fa1e996e4 /contrib/gitview
parent50319850343dfe534939ee6b38507d5a8fc44b50 (diff)
downloadgit-d27d5b3c5b97ca30dfc5c448dc8cdae914131051.zip
git-d27d5b3c5b97ca30dfc5c448dc8cdae914131051.tar.gz
git-d27d5b3c5b97ca30dfc5c448dc8cdae914131051.tar.bz2
gitview: ls-remote invocation shellquote safety.
This will allow you to point GIT_DIR at directories with funny names. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'contrib/gitview')
-rwxr-xr-xcontrib/gitview/gitview6
1 files changed, 1 insertions, 5 deletions
diff --git a/contrib/gitview/gitview b/contrib/gitview/gitview
index 5c338c0..4b52eb7 100755
--- a/contrib/gitview/gitview
+++ b/contrib/gitview/gitview
@@ -454,11 +454,7 @@ class GitView:
self.bt_sha1 = { }
ls_remote = re.compile('^(.{40})\trefs/([^^]+)(?:\\^(..))?$');
- git_dir = os.getenv("GIT_DIR")
- if (git_dir == None):
- git_dir = ".git"
-
- fp = os.popen('git ls-remote ' + git_dir)
+ fp = os.popen('git ls-remote "${GIT_DIR-.git}"')
while 1:
line = string.strip(fp.readline())
if line == '':