Skip to content

Commit d5cbdba

Browse files
committed
Merge branch 'cc/bisect-skip'
* cc/bisect-skip: bisect: teach "skip" to accept special arguments like "A..B"
2 parents 8c1944d + ee2314f commit d5cbdba

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

git-bisect.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,21 @@ check_expected_revs() {
191191
done
192192
}
193193

194+
bisect_skip() {
195+
all=''
196+
for arg in "$@"
197+
do
198+
case "$arg" in
199+
*..*)
200+
revs=$(git rev-list "$arg") || die "Bad rev input: $arg" ;;
201+
*)
202+
revs="'$arg'" ;;
203+
esac
204+
all="$all $revs"
205+
done
206+
bisect_state 'skip' $all
207+
}
208+
194209
bisect_state() {
195210
bisect_autostart
196211
state=$1
@@ -630,8 +645,10 @@ case "$#" in
630645
git bisect -h ;;
631646
start)
632647
bisect_start "$@" ;;
633-
bad|good|skip)
648+
bad|good)
634649
bisect_state "$cmd" "$@" ;;
650+
skip)
651+
bisect_skip "$@" ;;
635652
next)
636653
# Not sure we want "next" at the UI level anymore.
637654
bisect_next "$@" ;;

0 commit comments

Comments
 (0)