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.
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>
29 git bisect run <cmd>...
30 use <cmd>... to automatically bisect.
32 Please use "git help bisect" to get the full man page.'
37 _x40
='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
38 _x40
="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
43 git bisect--helper
--bisect-next-check $TERM_GOOD $TERM_BAD fail ||
exit
47 if test -n "${DISPLAY+set}${SESSIONNAME+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" &&
48 type gitk
>/dev
/null
2>&1
57 -*) set git log
"$@" ;;
62 eval '"$@"' --bisect -- $
(cat "$GIT_DIR/BISECT_NAMES")
66 git bisect--helper
--bisect-next-check $TERM_GOOD $TERM_BAD fail ||
exit
68 test -n "$*" || die
"$(gettext "bisect run failed
: no
command provided.
")"
73 eval_gettextln
"running \$command"
77 # Check for really bad run error.
78 if [ $res -lt 0 -o $res -ge 128 ]
80 eval_gettextln
"bisect run failed:
81 exit code \$res from '\$command' is < 0 or >= 128" >&2
85 # Find current state depending on run success or failure.
86 # A special exit code of 125 means cannot test.
97 git bisect--helper
--bisect-state $state >"$GIT_DIR/BISECT_RUN"
100 cat "$GIT_DIR/BISECT_RUN"
102 if sane_grep
"first $TERM_BAD commit could be any of" "$GIT_DIR/BISECT_RUN" \
105 gettextln
"bisect run cannot continue any more" >&2
111 eval_gettextln
"bisect run failed:
112 'bisect-state \$state' exited with error code \$res" >&2
116 if sane_grep
"is the first $TERM_BAD commit" "$GIT_DIR/BISECT_RUN" >/dev
/null
118 gettextln
"bisect run success"
126 if test -s "$GIT_DIR/BISECT_TERMS"
131 } <"$GIT_DIR/BISECT_TERMS"
146 git bisect--helper
--bisect-start "$@" ;;
147 bad|good|new|old|
"$TERM_BAD"|
"$TERM_GOOD")
148 git bisect--helper
--bisect-state "$cmd" "$@" ;;
150 git bisect--helper
--bisect-skip "$@" ||
exit;;
152 # Not sure we want "next" at the UI level anymore.
153 git bisect--helper
--bisect-next "$@" ||
exit ;;
155 bisect_visualize
"$@" ;;
157 git bisect--helper
--bisect-reset "$@" ;;
159 git bisect--helper
--bisect-replay "$@" ||
exit;;
161 git bisect--helper
--bisect-log ||
exit ;;
165 git bisect--helper
--bisect-terms "$@" ||
exit;;