userdiff: support regexec(3) with multi-byte support
[git/debian.git] / git-bisect.sh
blobdfce4b4f44e05d1074acc103e8b8c16f702a1411
1 #!/bin/sh
3 USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|view|replay|log|run]'
4 LONG_USAGE='git bisect help
5 print this long help message.
6 git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]
7 [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] [<pathspec>...]
8 reset bisect state and start bisection.
9 git bisect (bad|new) [<rev>]
10 mark <rev> a known-bad revision/
11 a revision after change in a given property.
12 git bisect (good|old) [<rev>...]
13 mark <rev>... known-good revisions/
14 revisions before change in a given property.
15 git bisect terms [--term-good | --term-bad]
16 show the terms used for old and new commits (default: bad, good)
17 git bisect skip [(<rev>|<range>)...]
18 mark <rev>... untestable revisions.
19 git bisect next
20 find next bisection to test and check it out.
21 git bisect reset [<commit>]
22 finish bisection search and go back to commit.
23 git bisect (visualize|view)
24 show bisect status in gitk.
25 git bisect replay <logfile>
26 replay bisection log.
27 git bisect log
28 show bisect log.
29 git bisect run <cmd>...
30 use <cmd>... to automatically bisect.
32 Please use "git help bisect" to get the full man page.'
34 OPTIONS_SPEC=
35 . git-sh-setup
37 TERM_BAD=bad
38 TERM_GOOD=good
40 get_terms () {
41 if test -s "$GIT_DIR/BISECT_TERMS"
42 then
44 read TERM_BAD
45 read TERM_GOOD
46 } <"$GIT_DIR/BISECT_TERMS"
50 case "$#" in
52 usage ;;
54 cmd="$1"
55 get_terms
56 shift
57 case "$cmd" in
58 help)
59 git bisect -h ;;
60 bad|good|new|old|"$TERM_BAD"|"$TERM_GOOD")
61 git bisect--helper state "$cmd" "$@" ;;
62 log)
63 git bisect--helper log || exit ;;
65 git bisect--helper "$cmd" "$@" ;;
66 esac
67 esac