check return code of prepare_revision_walk

A failure in prepare_revision_walk can be caused by
a not parseable object.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Martin Koegler
2008-02-18 08:31:56 +01:00
committed by Junio C Hamano
parent 24e8a3c946
commit 3d51e1b5b8
11 changed files with 28 additions and 14 deletions

View File

@ -2369,7 +2369,8 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
* bottom commits we would reach while traversing as
* uninteresting.
*/
prepare_revision_walk(&revs);
if (prepare_revision_walk(&revs))
die("revision walk setup failed");
if (is_null_sha1(sb.final->object.sha1)) {
char *buf;