mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
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>
This commit is contained in:
parent
5031985034
commit
d27d5b3c5b
@ -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 == '':
|
||||
|
Loading…
Reference in New Issue
Block a user