bisect: add quit command
PATCH 1/1 bisect: add quit command
git bisect quit will call git reset HEAD so that the working tree remains at the current revision
--- Documentation/git-bisect.txt | 12 ++++++++++++ git-bisect.sh | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-)
Documentation/git-bisect.txt +12 -0
@@ -23,6 +23,7 @@ on the subcommand: git bisect terms [--term-good | --term-bad] git bisect skip [(<rev>|<range>)...] git bisect reset [<commit>] + git bisect quit git bisect visualize git bisect replay <logfile> git bisect log
@@ -120,6 +121,17 @@ bad revision, while `git bisect reset HEAD` will leave you on the current bisection commit and avoid switching commits at all. +Bisect quit +~~~~~~~~~~~ + +It's an equivalent of bisect reset but that stays at the current +revision instead of taking your working tree to the starting revision. + +------------------------------------------------ +$ git bisect quit +------------------------------------------------ + + Alternate terms ~~~~~~~~~~~~~~~
git-bisect.sh +10 -1
@@ -1,6 +1,6 @@ #!/bin/sh -USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]' +USAGE='[help|start|bad|good|new|old|terms|skip|next|quit|reset|visualize|replay|log|run]' LONG_USAGE='git bisect help print this long help message. git bisect start [--term-{old,good}=<term> --term-{new,bad}=<term>]
@@ -20,6 +20,9 @@ git bisect next find next bisection to test and check it out. git bisect reset [<commit>] finish bisection search and go back to commit. +git bisect quit + stop bisection on its tracks and stay on current revision. + Equivalent to git bisect reset HEAD git bisect visualize show bisect status in gitk. git bisect replay <logfile>
@@ -433,6 +436,10 @@ Try 'git bisect reset <commit>'.")" bisect_clean_state } +bisect_quit() { + bisect_reset "HEAD" +} + bisect_clean_state() { # There may be some refs packed during bisection. git for-each-ref --format='%(refname) %(objectname)' refs/bisect/\* |
@@ -683,6 +690,8 @@ case "$#" in bisect_visualize "$@" ;; reset) bisect_reset "$@" ;; + quit) + bisect_quit ;; replay) bisect_replay "$@" ;; log)
Signature · 1 line
2.11.0.rc1
I found out about "git bisect reset HEAD" while working on "git bisect quit" but I think it's still worth it.
Let me know.
Quoted 82 lines · Edmundo Carmona Antoranz
git bisect quit will call git reset HEAD so that the working tree remains at the current revision
--- Documentation/git-bisect.txt | 12 ++++++++++++ git-bisect.sh | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-)Documentation/git-bisect.txt +12
-0@@ -23,6 +23,7 @@ on the subcommand: git bisect terms [--term-good | --term-bad] git bisect skip [(<rev>|<range>)...] git bisect reset [<commit>] + git bisect quit git bisect visualize git bisect replay <logfile> git bisect log@@ -120,6 +121,17 @@ bad revision, while `git bisect reset HEAD` will leave you on the current bisection commit and avoid switching commits at all. +Bisect quit +~~~~~~~~~~~ + +It's an equivalent of bisect reset but that stays at the current +revision instead of taking your working tree to the starting revision. + +------------------------------------------------ +$ git bisect quit +------------------------------------------------ + + Alternate terms ~~~~~~~~~~~~~~~git-bisect.sh +10
-2@@ -1,6 +1,6 @@ #!/bin/sh -USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]' +USAGE='[help|start|bad|good|new|old|terms|skip|next|quit|reset|visualize|replay|log|run]' LONG_USAGE='git bisect help print this long help message. git bisect start [--term-{old,good}=<term> --term-{new,bad}=<term>]@@ -20,6 +20,9 @@ git bisect next find next bisection to test and check it out. git bisect reset [<commit>] finish bisection search and go back to commit. +git bisect quit + stop bisection on its tracks and stay on current revision. + Equivalent to git bisect reset HEAD git bisect visualize show bisect status in gitk. git bisect replay <logfile>@@ -433,6 +436,10 @@ Try 'git bisect reset <commit>'.")" bisect_clean_state } +bisect_quit() { + bisect_reset "HEAD" +} + bisect_clean_state() { # There may be some refs packed during bisection. git for-each-ref --format='%(refname) %(objectname)' refs/bisect/\* |@@ -683,6 +690,8 @@ case "$#" in bisect_visualize "$@" ;; reset) bisect_reset "$@" ;; + quit) + bisect_quit ;; replay) bisect_replay "$@" ;; log) --2.11.0.rc1