From: Junio C Hamano Date: Wed, 22 Feb 2006 11:47:20 +0000 (-0800) Subject: gitview: ls-remote invocation shellquote safety. X-Git-Tag: v1.3.0-rc1~159 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d27d5b3c5b97ca30dfc5c448dc8cdae914131051;p=git.git 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 --- diff --git a/contrib/gitview/gitview b/contrib/gitview/gitview index 5c338c022..4b52eb7dc 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 == '':