From d27d5b3c5b97ca30dfc5c448dc8cdae914131051 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 22 Feb 2006 03:47:20 -0800 Subject: 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 --- contrib/gitview/gitview | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'contrib/gitview') 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 == '': -- cgit v1.2.1