aboutsummaryrefslogtreecommitdiff
path: root/git-bisect.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh14
1 files changed, 5 insertions, 9 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index 48fb92d61..6644b10e3 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -151,20 +151,16 @@ bisect_state() {
rev=$(git rev-parse --verify HEAD) ||
die "Bad rev input: HEAD"
bisect_write "$state" "$rev" ;;
- 2,bad)
- rev=$(git rev-parse --verify "$2^{commit}") ||
- die "Bad rev input: $2"
- bisect_write "$state" "$rev" ;;
- *,good|*,skip)
+ 2,bad|*,good|*,skip)
shift
- revs=$(git rev-parse --revs-only --no-flags "$@") &&
- test '' != "$revs" || die "Bad rev input: $@"
- for rev in $revs
+ for rev in "$@"
do
rev=$(git rev-parse --verify "$rev^{commit}") ||
- die "Bad rev commit: $rev^{commit}"
+ die "Bad rev input: $rev"
bisect_write "$state" "$rev"
done ;;
+ *,bad)
+ die "'git bisect bad' can take only one argument." ;;
*)
usage ;;
esac