gitweb: Harden parse_commit and parse_commits
commit68c4e0ff8a858fdd1bc02d958e2bc980c149e125
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)
treea1dd59849937cce18ca75961bb42013717e8ed0e
parenta3935e6791c619a9f2f472e9e553d45d88c4e263
gitweb: Harden parse_commit and parse_commits

Gitweb has problems and gives errors when repository it shows is on
unborn branch (HEAD doesn't point to a valid commit), but there exist
other branches.

One of errors that shows in gitweb logs is undefined $commit_id in
parse_commits() subroutine.  Therefore we harden both parse_commit()
and parse_commits() against undefined $commit_id, and against no
output from git-rev-list because HEAD doesn't point to a commit.

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