git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] bisect: add quit command
@ 2017-03-25 21:17 Edmundo Carmona Antoranz
  2017-03-25 21:18 ` Edmundo Carmona Antoranz
  0 siblings, 1 reply; 2+ messages in thread
From: Edmundo Carmona Antoranz @ 2017-03-25 21:17 UTC (permalink / raw)
  To: git; +Cc: Matthieu Moy, Antoine Delaite, 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(-)

diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index bdd915a66..de79e9e44 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -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
 ~~~~~~~~~~~~~~~
 
diff --git a/git-bisect.sh b/git-bisect.sh
index ae3cb013e..adbff2c69 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bisect: add quit command
  2017-03-25 21:17 [PATCH] bisect: add quit command Edmundo Carmona Antoranz
@ 2017-03-25 21:18 ` Edmundo Carmona Antoranz
  0 siblings, 0 replies; 2+ messages in thread
From: Edmundo Carmona Antoranz @ 2017-03-25 21:18 UTC (permalink / raw)
  To: Git List

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.

On Sat, Mar 25, 2017 at 3:17 PM, Edmundo Carmona Antoranz
<eantoranz@gmail.com> wrote:
> 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(-)
>
> diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
> index bdd915a66..de79e9e44 100644
> --- a/Documentation/git-bisect.txt
> +++ b/Documentation/git-bisect.txt
> @@ -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
>  ~~~~~~~~~~~~~~~
>
> diff --git a/git-bisect.sh b/git-bisect.sh
> index ae3cb013e..adbff2c69 100755
> --- a/git-bisect.sh
> +++ b/git-bisect.sh
> @@ -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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-25 21:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-25 21:17 [PATCH] bisect: add quit command Edmundo Carmona Antoranz
2017-03-25 21:18 ` Edmundo Carmona Antoranz

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).