Skip to content

Commit

Permalink
Merge branch 'rj/bisect-skip-honor-terms'
Browse files Browse the repository at this point in the history
"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
  • Loading branch information
gitster committed May 11, 2021
2 parents 49f38e2 + 4cd66e7 commit 8ca4771
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions builtin/bisect--helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,7 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
break;
case BISECT_SKIP:
set_terms(&terms, "bad", "good");
get_terms(&terms);
res = bisect_skip(&terms, argv, argc);
break;
default:
Expand Down
11 changes: 11 additions & 0 deletions t/t6030-bisect-porcelain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,17 @@ test_expect_success 'bisect start takes options and revs in any order' '
test_cmp expected actual
'

# Bisect is started with --term-new and --term-old arguments,
# then skip. The HEAD should be changed.
test_expect_success 'bisect skip works with --term*' '
git bisect reset &&
git bisect start --term-new=fixed --term-old=unfixed HEAD $HASH1 &&
hash_skipped_from=$(git rev-parse --verify HEAD) &&
git bisect skip &&
hash_skipped_to=$(git rev-parse --verify HEAD) &&
test "$hash_skipped_from" != "$hash_skipped_to"
'

test_expect_success 'git bisect reset cleans bisection state properly' '
git bisect reset &&
git bisect start &&
Expand Down

0 comments on commit 8ca4771

Please sign in to comment.