summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@gmail.com>2014-08-10 21:33:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-08-12 18:00:33 (GMT)
commit81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c (patch)
tree974a155e73dec708825519c9f21a44d678bc86ed /remote.c
parent32f56600bb6ac6fc57183e79d2c1515dfa56672f (diff)
downloadgit-81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c.zip
git-81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c.tar.gz
git-81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c.tar.bz2
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>
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/remote.c b/remote.c
index 0e9459c..dc0c427 100644
--- a/remote.c
+++ b/remote.c
@@ -1898,7 +1898,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;