X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=bisect.c;h=b556b11610480afd80cddd86a81af9737254ee36;hb=6d84bcb5de78251d98f7d3e80e822d9a4b8f4df3;hp=b779a9589aae28ed8e92ca64309fb62936480e9d;hpb=410e99fadf25b65b70d9bf90fd8bd5a5d1ea3c8a;p=git.git diff --git a/bisect.c b/bisect.c index b779a9589..b556b1161 100644 --- a/bisect.c +++ b/bisect.c @@ -593,7 +593,7 @@ struct commit_list *filter_skipped(struct commit_list *list, * is increased by one between each call, but that should not matter * for this application. */ -int get_prn(int count) { +static int get_prn(int count) { count = count * 1103515245 + 12345; return ((unsigned)(count/65536) % PRN_MODULO); } @@ -813,11 +813,11 @@ static void handle_skipped_merge_base(const unsigned char *mb) char *bad_hex = sha1_to_hex(current_bad_sha1); char *good_hex = join_sha1_array_hex(&good_revs, ' '); - fprintf(stderr, "Warning: the merge base between %s and [%s] " + warning("the merge base between %s and [%s] " "must be skipped.\n" "So we cannot be sure the first bad commit is " "between %s and %s.\n" - "We continue anyway.\n", + "We continue anyway.", bad_hex, good_hex, mb_hex, bad_hex); free(good_hex); } @@ -986,6 +986,12 @@ int bisect_next_all(const char *prefix) exit(1); } + if (!all) { + fprintf(stderr, "No testable commit found.\n" + "Maybe you started with bad path parameters?\n"); + exit(4); + } + bisect_rev = revs.commits->item->object.sha1; memcpy(bisect_rev_hex, sha1_to_hex(bisect_rev), 41);