diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-01 01:09:21 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-01 01:09:21 -0800 |
commit | 9e2b8857413127ae200735fa004bd445b2c8ca61 (patch) | |
tree | 95cf29ebc03633d30a458dc4da8c4cf70555b0a7 | |
parent | Merge branch 'maint' (diff) | |
parent | bisect: error out when passing bad path parameters (diff) | |
download | tgif-9e2b8857413127ae200735fa004bd445b2c8ca61.tar.xz |
Merge branch 'cc/maint-bisect-paths'
* cc/maint-bisect-paths:
bisect: error out when passing bad path parameters
-rw-r--r-- | bisect.c | 6 | ||||
-rwxr-xr-x | t/t6030-bisect-porcelain.sh | 5 |
2 files changed, 11 insertions, 0 deletions
@@ -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); diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh index c51865fdbc..3b042aacd6 100755 --- a/t/t6030-bisect-porcelain.sh +++ b/t/t6030-bisect-porcelain.sh @@ -567,6 +567,11 @@ test_expect_success 'skipping away from skipped commit' ' test "$para3" = "$PARA_HASH3" ' +test_expect_success 'erroring out when using bad path parameters' ' + test_must_fail git bisect start $PARA_HASH7 $HASH1 -- foobar 2> error.txt && + grep "bad path parameters" error.txt +' + # # test_done |