Skip to content

Commit

Permalink
gitview: ls-remote invocation shellquote safety.
Browse files Browse the repository at this point in the history
This will allow you to point GIT_DIR at directories with funny names.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Feb 22, 2006
1 parent 5031985 commit d27d5b3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions contrib/gitview/gitview
Original file line number Diff line number Diff line change
Expand Up @@ -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 == '':
Expand Down

0 comments on commit d27d5b3

Please sign in to comment.