]> git.ipfire.org Git - thirdparty/git.git/blobdiff - bisect.c
bisect: error out when passing bad path parameters
[thirdparty/git.git] / bisect.c
index dc18db8af96b093d7cb16eb88d3f738f98dc30f6..88881f7b6ed7a69498561912dbf4934697c17e4b 100644 (file)
--- a/bisect.c
+++ b/bisect.c
@@ -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);