Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh36
1 files changed, 4 insertions, 32 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index ebf445223c..9e993a8187 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -238,7 +238,8 @@ bisect_skip() {
bisect_state() {
bisect_autostart
state=$1
- check_and_set_terms $state
+ git bisect--helper --check-and-set-terms $state $TERM_GOOD $TERM_BAD || exit
+ get_terms
case "$#,$state" in
0,*)
die "Please call 'bisect_state' with at least one argument." ;;
@@ -390,7 +391,8 @@ bisect_replay () {
command="$bisect"
fi
get_terms
- check_and_set_terms "$command"
+ git bisect--helper --check-and-set-terms "$command" "$TERM_GOOD" "$TERM_BAD" || exit
+ get_terms
case "$command" in
start)
cmd="bisect_start $rev"
@@ -482,36 +484,6 @@ get_terms () {
fi
}
-check_and_set_terms () {
- cmd="$1"
- case "$cmd" in
- skip|start|terms) ;;
- *)
- if test -s "$GIT_DIR/BISECT_TERMS" && test "$cmd" != "$TERM_BAD" && test "$cmd" != "$TERM_GOOD"
- then
- die "$(eval_gettext "Invalid command: you're currently in a \$TERM_BAD/\$TERM_GOOD bisect.")"
- fi
- case "$cmd" in
- bad|good)
- if ! test -s "$GIT_DIR/BISECT_TERMS"
- then
- TERM_BAD=bad
- TERM_GOOD=good
- git bisect--helper --write-terms "$TERM_BAD" "$TERM_GOOD" || exit
- fi
- ;;
- new|old)
- if ! test -s "$GIT_DIR/BISECT_TERMS"
- then
- TERM_BAD=new
- TERM_GOOD=old
- git bisect--helper --write-terms "$TERM_BAD" "$TERM_GOOD" || exit
- fi
- ;;
- esac ;;
- esac
-}
-
bisect_voc () {
case "$1" in
bad) echo "bad|new" ;;