diff: allow turning on textconv explicitly for plumbing
[gitweb.git] / git-bisect.sh
index 79de7017e88b746971f5a730b8615290bba2890d..17a35f6adc79480d0533a4ff98b2817c836a7e78 100755 (executable)
@@ -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"
@@ -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 "$@" ;;