prepare_revision_walk(): check for return value in all places

Even the documentation tells us:

	You should check if it returns any error (non-zero return
	code) and if it does not, you can start using get_revision()
	to do the iteration.

In preparation for this commit, I grepped all occurrences of
prepare_revision_walk and added error messages, when there were none.

Signed-off-by: Stefan Beller <stefanbeller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller
2014-08-10 23:33:26 +02:00
committed by Junio C Hamano
parent 32f56600bb
commit 81c3ce3cdc
3 changed files with 7 additions and 3 deletions

View File

@ -653,7 +653,9 @@ static int print_ref_list(int kinds, int detached, int verbose, int abbrev, stru
add_pending_object(&ref_list.revs,
(struct object *) filter, "");
ref_list.revs.limited = 1;
prepare_revision_walk(&ref_list.revs);
if (prepare_revision_walk(&ref_list.revs))
die(_("revision walk setup failed"));
if (verbose)
ref_list.maxwidth = calc_maxwidth(&ref_list);
}