{"thread":{"id":"45512","subject":"[PATCH] bisect: add quit command","startedAt":"2017-03-25T21:18:40Z","lastAt":"2017-03-25T21:19:12Z","messageCount":2,"participants":["Edmundo Carmona Antoranz"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"315407","messageId":"20170325211709.21265-1-eantoranz@gmail.com","threadId":"45512","inReplyTo":null,"subject":"[PATCH] bisect: add quit command","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2017-03-25T21:17:09Z","receivedAt":"2017-03-25T21:18:40Z","isPatch":true,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"git bisect quit will call git reset HEAD so that the working tree\nremains at the current revision\n---\n Documentation/git-bisect.txt | 12 ++++++++++++\n git-bisect.sh                | 11 ++++++++++-\n 2 files changed, 22 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt\nindex bdd915a66..de79e9e44 100644\n--- a/Documentation/git-bisect.txt\n+++ b/Documentation/git-bisect.txt\n@@ -23,6 +23,7 @@ on the subcommand:\n  git bisect terms [--term-good | --term-bad]\n  git bisect skip [(<rev>|<range>)...]\n  git bisect reset [<commit>]\n+ git bisect quit\n  git bisect visualize\n  git bisect replay <logfile>\n  git bisect log\n@@ -120,6 +121,17 @@ bad revision, while `git bisect reset HEAD` will leave you on the\n current bisection commit and avoid switching commits at all.\n \n \n+Bisect quit\n+~~~~~~~~~~~\n+\n+It's an equivalent of bisect reset but that stays at the current\n+revision instead of taking your working tree to the starting revision.\n+\n+------------------------------------------------\n+$ git bisect quit\n+------------------------------------------------\n+\n+\n Alternate terms\n ~~~~~~~~~~~~~~~\n \ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex ae3cb013e..adbff2c69 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]'\n+USAGE='[help|start|bad|good|new|old|terms|skip|next|quit|reset|visualize|replay|log|run]'\n LONG_USAGE='git bisect help\n \tprint this long help message.\n git bisect start [--term-{old,good}=<term> --term-{new,bad}=<term>]\n@@ -20,6 +20,9 @@ git bisect next\n \tfind next bisection to test and check it out.\n git bisect reset [<commit>]\n \tfinish bisection search and go back to commit.\n+git bisect quit\n+\tstop bisection on its tracks and stay on current revision.\n+\tEquivalent to git bisect reset HEAD\n git bisect visualize\n \tshow bisect status in gitk.\n git bisect replay <logfile>\n@@ -433,6 +436,10 @@ Try 'git bisect reset <commit>'.\")\"\n \tbisect_clean_state\n }\n \n+bisect_quit() {\n+\tbisect_reset \"HEAD\"\n+}\n+\n bisect_clean_state() {\n \t# There may be some refs packed during bisection.\n \tgit for-each-ref --format='%(refname) %(objectname)' refs/bisect/\\* |\n@@ -683,6 +690,8 @@ case \"$#\" in\n \t\tbisect_visualize \"$@\" ;;\n \treset)\n \t\tbisect_reset \"$@\" ;;\n+\tquit)\n+\t\tbisect_quit ;;\n \treplay)\n \t\tbisect_replay \"$@\" ;;\n \tlog)\n-- \n2.11.0.rc1\n\n"},{"id":"315409","messageId":"CAOc6etYdLidaeT8SGMyxOkXqcvSzPJez=Vdy5HBLop6soxzSrg@mail.gmail.com","threadId":"45512","inReplyTo":"20170325211709.21265-1-eantoranz@gmail.com","subject":"Re: [PATCH] bisect: add quit command","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2017-03-25T21:18:44Z","receivedAt":"2017-03-25T21:19:12Z","isPatch":true,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"I found out about \"git bisect reset HEAD\" while working on \"git bisect\nquit\" but I think it's still worth it.\n\nLet me know.\n\nOn Sat, Mar 25, 2017 at 3:17 PM, Edmundo Carmona Antoranz\n<eantoranz@gmail.com> wrote:\n> git bisect quit will call git reset HEAD so that the working tree\n> remains at the current revision\n> ---\n>  Documentation/git-bisect.txt | 12 ++++++++++++\n>  git-bisect.sh                | 11 ++++++++++-\n>  2 files changed, 22 insertions(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt\n> index bdd915a66..de79e9e44 100644\n> --- a/Documentation/git-bisect.txt\n> +++ b/Documentation/git-bisect.txt\n> @@ -23,6 +23,7 @@ on the subcommand:\n>   git bisect terms [--term-good | --term-bad]\n>   git bisect skip [(<rev>|<range>)...]\n>   git bisect reset [<commit>]\n> + git bisect quit\n>   git bisect visualize\n>   git bisect replay <logfile>\n>   git bisect log\n> @@ -120,6 +121,17 @@ bad revision, while `git bisect reset HEAD` will leave you on the\n>  current bisection commit and avoid switching commits at all.\n>\n>\n> +Bisect quit\n> +~~~~~~~~~~~\n> +\n> +It's an equivalent of bisect reset but that stays at the current\n> +revision instead of taking your working tree to the starting revision.\n> +\n> +------------------------------------------------\n> +$ git bisect quit\n> +------------------------------------------------\n> +\n> +\n>  Alternate terms\n>  ~~~~~~~~~~~~~~~\n>\n> diff --git a/git-bisect.sh b/git-bisect.sh\n> index ae3cb013e..adbff2c69 100755\n> --- a/git-bisect.sh\n> +++ b/git-bisect.sh\n> @@ -1,6 +1,6 @@\n>  #!/bin/sh\n>\n> -USAGE='[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]'\n> +USAGE='[help|start|bad|good|new|old|terms|skip|next|quit|reset|visualize|replay|log|run]'\n>  LONG_USAGE='git bisect help\n>         print this long help message.\n>  git bisect start [--term-{old,good}=<term> --term-{new,bad}=<term>]\n> @@ -20,6 +20,9 @@ git bisect next\n>         find next bisection to test and check it out.\n>  git bisect reset [<commit>]\n>         finish bisection search and go back to commit.\n> +git bisect quit\n> +       stop bisection on its tracks and stay on current revision.\n> +       Equivalent to git bisect reset HEAD\n>  git bisect visualize\n>         show bisect status in gitk.\n>  git bisect replay <logfile>\n> @@ -433,6 +436,10 @@ Try 'git bisect reset <commit>'.\")\"\n>         bisect_clean_state\n>  }\n>\n> +bisect_quit() {\n> +       bisect_reset \"HEAD\"\n> +}\n> +\n>  bisect_clean_state() {\n>         # There may be some refs packed during bisection.\n>         git for-each-ref --format='%(refname) %(objectname)' refs/bisect/\\* |\n> @@ -683,6 +690,8 @@ case \"$#\" in\n>                 bisect_visualize \"$@\" ;;\n>         reset)\n>                 bisect_reset \"$@\" ;;\n> +       quit)\n> +               bisect_quit ;;\n>         replay)\n>                 bisect_replay \"$@\" ;;\n>         log)\n> --\n> 2.11.0.rc1\n>\n"}]}