From 81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Sun, 10 Aug 2014 23:33:26 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/commit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'builtin/commit.c') diff --git a/builtin/commit.c b/builtin/commit.c index 39cf8976e..447ded63f 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -989,7 +989,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}; -- cgit v1.2.1