gitweb: Silence stderr in parse_commit*() subroutines
commit541b087d66b01661b79774e1ede515c2de7c2bee
authorJakub Narebski <jnareb@gmail.com>
Tue, 8 May 2012 19:35:04 +0000 (8 21:35 +0200)
committerJakub Narebski <jnareb@gmail.com>
Tue, 8 May 2012 19:35:04 +0000 (8 21:35 +0200)
tree08030303c9adfdcba226cf34072867a594ce9714
parent68c4e0ff8a858fdd1bc02d958e2bc980c149e125
gitweb: Silence stderr in parse_commit*() subroutines

git-rev-list command in parse_commit() and parse_commits() can fail
because $commit_id doesn't point to a valid commit; for example if we
are on unborn branch HEAD doesn't point to a valid commit.

In this case git-rev-list prints

  fatal: bad revision 'HEAD'

on its standard error.  This commit silences this warning, at the cost
of using shell to redirect it to /dev/null, and relying on
quote_command() to protect against code injection.

Note however that such error message from git (from extrenal command)
usually but not always does not appear in web server logs.

Reported-by: rajesh boyapati <boyapatisrajesh@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
gitweb/gitweb.perl