diff options
author | Pranit Bauva <pranit.bauva@gmail.com> | 2021-09-13 19:39:02 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-13 13:37:37 -0700 |
commit | 5e1f28d20600ea7d482db875cbd759b410c095b7 (patch) | |
tree | a1fb73f688ba070daee32a2a7659a383e98c1105 /git-bisect.sh | |
parent | run-command: make `exists_in_PATH()` non-static (diff) | |
download | tgif-5e1f28d20600ea7d482db875cbd759b410c095b7.tar.xz |
bisect--helper: reimplement `bisect_visualize()` shell function in C
Reimplement the `bisect_visualize()` shell function
in C and also add `--bisect-visualize` subcommand to
`git bisect--helper` to call it from git-bisect.sh.
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
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-x | git-bisect.sh | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/git-bisect.sh b/git-bisect.sh index 6a7afaea8d..95f7f3fb8c 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -39,29 +39,6 @@ _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" TERM_BAD=bad TERM_GOOD=good -bisect_visualize() { - git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD fail || exit - - if test $# = 0 - then - if test -n "${DISPLAY+set}${SESSIONNAME+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" && - type gitk >/dev/null 2>&1 - then - set gitk - else - set git log - fi - else - case "$1" in - git*|tig) ;; - -*) set git log "$@" ;; - *) set git "$@" ;; - esac - fi - - eval '"$@"' --bisect -- $(cat "$GIT_DIR/BISECT_NAMES") -} - bisect_run () { git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD fail || exit @@ -152,7 +129,7 @@ case "$#" in # Not sure we want "next" at the UI level anymore. git bisect--helper --bisect-next "$@" || exit ;; visualize|view) - bisect_visualize "$@" ;; + git bisect--helper --bisect-visualize "$@" || exit;; reset) git bisect--helper --bisect-reset "$@" ;; replay) |