From: Edmundo Carmona Antoranz <eantoranz@gmail.com>
To: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] bisect: add quit command
Date: Sat, 25 Mar 2017 15:18:44 -0600 [thread overview]
Message-ID: <CAOc6etYdLidaeT8SGMyxOkXqcvSzPJez=Vdy5HBLop6soxzSrg@mail.gmail.com> (raw)
In-Reply-To: <20170325211709.21265-1-eantoranz@gmail.com>
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
>
prev parent reply other threads:[~2017-03-25 21:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-25 21:17 [PATCH] bisect: add quit command Edmundo Carmona Antoranz
2017-03-25 21:18 ` Edmundo Carmona Antoranz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOc6etYdLidaeT8SGMyxOkXqcvSzPJez=Vdy5HBLop6soxzSrg@mail.gmail.com' \
--to=eantoranz@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).