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:
authorPranit Bauva <pranit.bauva@gmail.com>2021-02-04 00:54:37 +0300
committerJunio C Hamano <gitster@pobox.com>2021-02-04 01:52:09 +0300
commite4c7b33747dccc6600bc528b51e91c11b474eb04 (patch)
treefefe82dc2dba4103f2d757b3085ee408630c9da5 /git-bisect.sh
parent9feea34810b750a6bca30ea82878fa2cbb0b830b (diff)
bisect--helper: reimplement `bisect_skip` shell function in C
Reimplement the `bisect_skip()` shell function in C and also add `bisect-skip` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-skip` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. Mentored-by: Lars Schneider <larsxschneider@gmail.com> Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com> Signed-off-by: Tanushree Tumane <tanushreetumane@gmail.com> Signed-off-by: Miriam Rubio <mirucam@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh17
1 files changed, 1 insertions, 16 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index e834154e29..6a7afaea8d 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -39,21 +39,6 @@ _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
TERM_BAD=bad
TERM_GOOD=good
-bisect_skip() {
- all=''
- for arg in "$@"
- do
- case "$arg" in
- *..*)
- revs=$(git rev-list "$arg") || die "$(eval_gettext "Bad rev input: \$arg")" ;;
- *)
- revs=$(git rev-parse --sq-quote "$arg") ;;
- esac
- all="$all $revs"
- done
- eval git bisect--helper --bisect-state 'skip' $all
-}
-
bisect_visualize() {
git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD fail || exit
@@ -162,7 +147,7 @@ case "$#" in
bad|good|new|old|"$TERM_BAD"|"$TERM_GOOD")
git bisect--helper --bisect-state "$cmd" "$@" ;;
skip)
- bisect_skip "$@" ;;
+ git bisect--helper --bisect-skip "$@" || exit;;
next)
# Not sure we want "next" at the UI level anymore.
git bisect--helper --bisect-next "$@" || exit ;;