diff options
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-x | git-bisect.sh | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/git-bisect.sh b/git-bisect.sh index 79de7017e8..85db4ba400 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -9,7 +9,7 @@ git bisect bad [<rev>] mark <rev> a known-bad revision. git bisect good [<rev>...] mark <rev>... known-good revisions. -git bisect skip [<rev>...] +git bisect skip [(<rev>|<range>)...] mark <rev>... untestable revisions. git bisect next find next bisection to test and check it out. @@ -191,6 +191,21 @@ check_expected_revs() { done } +bisect_skip() { + all='' + for arg in "$@" + do + case "$arg" in + *..*) + revs=$(git rev-list "$arg") || die "Bad rev input: $arg" ;; + *) + revs=$(sq "$arg") ;; + esac + all="$all $revs" + done + eval bisect_state 'skip' $all +} + bisect_state() { bisect_autostart state=$1 @@ -455,7 +470,7 @@ bisect_next() { good=$(git for-each-ref --format='^%(objectname)' \ "refs/bisect/good-*" | tr '\012' ' ') && skip=$(git for-each-ref --format='%(objectname)' \ - "refs/bisect/skip-*" | tr '\012' ' ') && + "refs/bisect/skip-*" | tr '\012' ' ') || exit # Maybe some merge bases must be tested first check_good_are_ancestors_of_bad "$bad" "$good" "$skip" @@ -493,7 +508,7 @@ bisect_visualize() { if test $# = 0 then - case "${DISPLAY+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" in + case "${DISPLAY+set}${SESSIONNAME+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" in '') set git log ;; set*) set gitk ;; esac @@ -630,8 +645,10 @@ case "$#" in git bisect -h ;; start) bisect_start "$@" ;; - bad|good|skip) + bad|good) bisect_state "$cmd" "$@" ;; + skip) + bisect_skip "$@" ;; next) # Not sure we want "next" at the UI level anymore. bisect_next "$@" ;; |