Skip to content

Commit

Permalink
Merge branch 'sb/prepare-revision-walk-error-check'
Browse files Browse the repository at this point in the history
* sb/prepare-revision-walk-error-check:
  prepare_revision_walk(): check for return value in all places
  • Loading branch information
Junio C Hamano committed Sep 9, 2014
2 parents 929df99 + 81c3ce3 commit 715b63c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion builtin/branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 2 additions & 1 deletion builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,8 @@ static const char *find_author_by_nickname(const char *name)
revs.mailmap = &mailmap;
read_mailmap(revs.mailmap, NULL);

prepare_revision_walk(&revs);
if (prepare_revision_walk(&revs))
die(_("revision walk setup failed"));
commit = get_revision(&revs);
if (commit) {
struct pretty_print_context ctx = {0};
Expand Down
3 changes: 2 additions & 1 deletion remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,8 @@ int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs)

init_revisions(&revs, NULL);
setup_revisions(rev_argc, rev_argv, &revs, NULL);
prepare_revision_walk(&revs);
if (prepare_revision_walk(&revs))
die("revision walk setup failed");

/* ... and count the commits on each side. */
*num_ours = 0;
Expand Down

0 comments on commit 715b63c

Please sign in to comment.