diff options
author | Stefan Beller <stefanbeller@gmail.com> | 2014-08-10 23:33:26 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-08-12 11:00:33 -0700 |
commit | 81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c (patch) | |
tree | 974a155e73dec708825519c9f21a44d678bc86ed /builtin/branch.c | |
parent | 32f56600bb6ac6fc57183e79d2c1515dfa56672f (diff) | |
download | git-81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c.tar.gz |
prepare_revision_walk(): check for return value in all placessb/prepare-revision-walk-error-check
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>
Diffstat (limited to 'builtin/branch.c')
-rw-r--r-- | builtin/branch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index 652b1d2d14..e91ecc6fbd 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -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); } |