Skip to content

Commit 8ca4771

Browse files
committed
Merge branch 'rj/bisect-skip-honor-terms'
"git bisect skip" when custom words are used for new/old did not work, which has been corrected. * rj/bisect-skip-honor-terms: bisect--helper: use BISECT_TERMS in 'bisect skip' command
2 parents 49f38e2 + 4cd66e7 commit 8ca4771

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

builtin/bisect--helper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,7 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
11261126
break;
11271127
case BISECT_SKIP:
11281128
set_terms(&terms, "bad", "good");
1129+
get_terms(&terms);
11291130
res = bisect_skip(&terms, argv, argc);
11301131
break;
11311132
default:

t/t6030-bisect-porcelain.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,17 @@ test_expect_success 'bisect start takes options and revs in any order' '
922922
test_cmp expected actual
923923
'
924924

925+
# Bisect is started with --term-new and --term-old arguments,
926+
# then skip. The HEAD should be changed.
927+
test_expect_success 'bisect skip works with --term*' '
928+
git bisect reset &&
929+
git bisect start --term-new=fixed --term-old=unfixed HEAD $HASH1 &&
930+
hash_skipped_from=$(git rev-parse --verify HEAD) &&
931+
git bisect skip &&
932+
hash_skipped_to=$(git rev-parse --verify HEAD) &&
933+
test "$hash_skipped_from" != "$hash_skipped_to"
934+
'
935+
925936
test_expect_success 'git bisect reset cleans bisection state properly' '
926937
git bisect reset &&
927938
git bisect start &&

0 commit comments

Comments
 (0)