{"thread":{"id":"65817","subject":"[PATCH] rebase: mention --abort alongside --continue","startedAt":"2026-06-15T19:19:33Z","lastAt":"2026-07-20T02:29:38Z","messageCount":14,"participants":["Harald Nordgren via GitGitGadget","Phillip Wood","Junio C Hamano","Harald Nordgren"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"545609","messageId":"pull.2330.git.git.1781551170529.gitgitgadget@gmail.com","threadId":"65817","inReplyTo":null,"subject":"[PATCH] rebase: mention --abort alongside --continue","fromName":"Harald Nordgren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-06-15T19:19:30Z","receivedAt":"2026-06-15T19:19:33Z","isPatch":true,"body":"From: Harald Nordgren <haraldnordgren@gmail.com>\n\nThe warning shown when an \"exec\" step fails and the \"git status\"\nadvice while splitting or editing a commit pointed users at \"git\nrebase --continue\" but not \"--abort\". Mention it in both, matching\nthe conflict case.\n\nSigned-off-by: Harald Nordgren <haraldnordgren@gmail.com>\n---\n    rebase: mention --abort when an exec step fails\n    \n    Mention git rebase --abort both in the warning shown when an exec step\n    fails and in the git status advice while splitting or editing a commit,\n    since rebase pointed users at --continue there without saying how to\n    bail out, unlike every comparable command.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2330%2FHaraldNordgren%2Frebase-exec-abort-hint-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2330/HaraldNordgren/rebase-exec-abort-hint-v1\nPull-Request: https://github.com/git/git/pull/2330\n\n sequencer.c            |  8 ++++++--\n t/t7512-status-help.sh | 17 +++++++++++++++++\n wt-status.c            |  7 ++++++-\n 3 files changed, 29 insertions(+), 3 deletions(-)\n\ndiff --git a/sequencer.c b/sequencer.c\nindex 57855b0066..c46e5b95bc 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -3884,7 +3884,9 @@ static int do_exec(struct repository *r, const char *command_line, int quiet)\n \t\t\t  \"You can fix the problem, and then run\\n\"\n \t\t\t  \"\\n\"\n \t\t\t  \"  git rebase --continue\\n\"\n-\t\t\t  \"\\n\"),\n+\t\t\t  \"\\n\"\n+\t\t\t  \"To abort and get back to the state before \\\"git rebase\\\", run \"\n+\t\t\t  \"\\\"git rebase --abort\\\".\\n\"),\n \t\t\tcommand_line,\n \t\t\tdirty ? _(\"and made changes to the index and/or the \"\n \t\t\t\t\"working tree.\\n\") : \"\");\n@@ -3897,7 +3899,9 @@ static int do_exec(struct repository *r, const char *command_line, int quiet)\n \t\t\t  \"Commit or stash your changes, and then run\\n\"\n \t\t\t  \"\\n\"\n \t\t\t  \"  git rebase --continue\\n\"\n-\t\t\t  \"\\n\"), command_line);\n+\t\t\t  \"\\n\"\n+\t\t\t  \"To abort and get back to the state before \\\"git rebase\\\", run \"\n+\t\t\t  \"\\\"git rebase --abort\\\".\\n\"), command_line);\n \t\tstatus = 1;\n \t}\n \ndiff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\nindex 08e82f7914..ca7ef66ae3 100755\n--- a/t/t7512-status-help.sh\n+++ b/t/t7512-status-help.sh\n@@ -206,6 +206,7 @@ No commands remaining.\n You are currently editing a commit while rebasing branch '\\''rebase_i_edit'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -240,6 +241,7 @@ Next command to do (1 remaining command):\n   (use \"git rebase --edit-todo\" to view and edit)\n You are currently splitting a commit while rebasing branch '\\''split_commit'\\'' on '\\''$ONTO'\\''.\n   (Once your working directory is clean, run \"git rebase --continue\")\n+  (use \"git rebase --abort\" to check out the original branch)\n \n Changes not staged for commit:\n   (use \"git add <file>...\" to update what will be committed)\n@@ -278,6 +280,7 @@ No commands remaining.\n You are currently editing a commit while rebasing branch '\\''amend_last'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -317,6 +320,7 @@ Next command to do (1 remaining command):\n You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -347,6 +351,7 @@ Next command to do (1 remaining command):\n   (use \"git rebase --edit-todo\" to view and edit)\n You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n   (Once your working directory is clean, run \"git rebase --continue\")\n+  (use \"git rebase --abort\" to check out the original branch)\n \n Changes not staged for commit:\n   (use \"git add <file>...\" to update what will be committed)\n@@ -383,6 +388,7 @@ Next command to do (1 remaining command):\n You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -414,6 +420,7 @@ Next command to do (1 remaining command):\n You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -445,6 +452,7 @@ Next command to do (1 remaining command):\n   (use \"git rebase --edit-todo\" to view and edit)\n You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n   (Once your working directory is clean, run \"git rebase --continue\")\n+  (use \"git rebase --abort\" to check out the original branch)\n \n Changes not staged for commit:\n   (use \"git add <file>...\" to update what will be committed)\n@@ -482,6 +490,7 @@ Next command to do (1 remaining command):\n You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -515,6 +524,7 @@ Next command to do (1 remaining command):\n You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -548,6 +558,7 @@ Next command to do (1 remaining command):\n   (use \"git rebase --edit-todo\" to view and edit)\n You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n   (Once your working directory is clean, run \"git rebase --continue\")\n+  (use \"git rebase --abort\" to check out the original branch)\n \n Changes not staged for commit:\n   (use \"git add <file>...\" to update what will be committed)\n@@ -587,6 +598,7 @@ Next command to do (1 remaining command):\n You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -718,6 +730,7 @@ No commands remaining.\n You are currently editing a commit while rebasing branch '\\''bisect'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n You are currently bisecting, started from branch '\\''bisect_while_rebasing'\\''.\n   (use \"git bisect reset\" to get back to the original branch)\n@@ -987,6 +1000,7 @@ No commands remaining.\n You are currently editing a commit while rebasing branch '\\''several_commits'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -1015,6 +1029,7 @@ Next commands to do (2 remaining commands):\n You are currently editing a commit while rebasing branch '\\''several_commits'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -1044,6 +1059,7 @@ Next commands to do (2 remaining commands):\n You are currently editing a commit while rebasing branch '\\''several_commits'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\n@@ -1064,6 +1080,7 @@ Next command to do (1 remaining command):\n You are currently editing a commit while rebasing branch '\\''several_commits'\\'' on '\\''$ONTO'\\''.\n   (use \"git commit --amend\" to amend the current commit)\n   (use \"git rebase --continue\" once you are satisfied with your changes)\n+  (use \"git rebase --abort\" to check out the original branch)\n \n nothing to commit (use -u to show untracked files)\n EOF\ndiff --git a/wt-status.c b/wt-status.c\nindex b17372390c..94fd14a058 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -1527,9 +1527,12 @@ static void show_rebase_in_progress(struct wt_status *s,\n \t\telse\n \t\t\tstatus_printf_ln(s, color,\n \t\t\t\t\t _(\"You are currently splitting a commit during a rebase.\"));\n-\t\tif (s->hints)\n+\t\tif (s->hints) {\n \t\t\tstatus_printf_ln(s, color,\n \t\t\t\t_(\"  (Once your working directory is clean, run \\\"git rebase --continue\\\")\"));\n+\t\t\tstatus_printf_ln(s, color,\n+\t\t\t\t_(\"  (use \\\"git rebase --abort\\\" to check out the original branch)\"));\n+\t\t}\n \t} else {\n \t\tif (s->state.branch)\n \t\t\tstatus_printf_ln(s, color,\n@@ -1544,6 +1547,8 @@ static void show_rebase_in_progress(struct wt_status *s,\n \t\t\t\t_(\"  (use \\\"git commit --amend\\\" to amend the current commit)\"));\n \t\t\tstatus_printf_ln(s, color,\n \t\t\t\t_(\"  (use \\\"git rebase --continue\\\" once you are satisfied with your changes)\"));\n+\t\t\tstatus_printf_ln(s, color,\n+\t\t\t\t_(\"  (use \\\"git rebase --abort\\\" to check out the original branch)\"));\n \t\t}\n \t}\n \twt_longstatus_print_trailer(s);\n\nbase-commit: ea97ad8d017de0c9037451a78008a0fd60abea0c\n-- \ngitgitgadget\n"},{"id":"545631","messageId":"89d72342-5aa1-4dcf-951b-d0c791f91738@gmail.com","threadId":"65817","inReplyTo":"pull.2330.git.git.1781551170529.gitgitgadget@gmail.com","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2026-06-16T08:36:35Z","receivedAt":"2026-06-16T08:36:38Z","isPatch":true,"body":"Hi Harald\n\nOn 15/06/2026 20:19, Harald Nordgren via GitGitGadget wrote:\n> From: Harald Nordgren <haraldnordgren@gmail.com>\n> \n> The warning shown when an \"exec\" step fails and the \"git status\"\n> advice while splitting or editing a commit pointed users at \"git\n> rebase --continue\" but not \"--abort\". Mention it in both, matching\n> the conflict case.\n\nI'm not sure that the \"failed exec\" and \"conflicts\" cases are equivalent \nthough. If you have some nasty conflict that you don't want to resolve \nthen aborting and trying another approach such is incrementally rebasing \nis the only option. If an exec command fails then it likely means that a \ntest has failed or some something similar which is minor inconvenience \nwhich needs fixing before continuing - it seems very unlikely that the \nuser would want to abort the rebase.\n\nThanks\n\nPhillip\n\n> Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>\n> ---\n>      rebase: mention --abort when an exec step fails\n>      \n>      Mention git rebase --abort both in the warning shown when an exec step\n>      fails and in the git status advice while splitting or editing a commit,\n>      since rebase pointed users at --continue there without saying how to\n>      bail out, unlike every comparable command.\n> \n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2330%2FHaraldNordgren%2Frebase-exec-abort-hint-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2330/HaraldNordgren/rebase-exec-abort-hint-v1\n> Pull-Request: https://github.com/git/git/pull/2330\n> \n>   sequencer.c            |  8 ++++++--\n>   t/t7512-status-help.sh | 17 +++++++++++++++++\n>   wt-status.c            |  7 ++++++-\n>   3 files changed, 29 insertions(+), 3 deletions(-)\n> \n> diff --git a/sequencer.c b/sequencer.c\n> index 57855b0066..c46e5b95bc 100644\n> --- a/sequencer.c\n> +++ b/sequencer.c\n> @@ -3884,7 +3884,9 @@ static int do_exec(struct repository *r, const char *command_line, int quiet)\n>   \t\t\t  \"You can fix the problem, and then run\\n\"\n>   \t\t\t  \"\\n\"\n>   \t\t\t  \"  git rebase --continue\\n\"\n> -\t\t\t  \"\\n\"),\n> +\t\t\t  \"\\n\"\n> +\t\t\t  \"To abort and get back to the state before \\\"git rebase\\\", run \"\n> +\t\t\t  \"\\\"git rebase --abort\\\".\\n\"),\n>   \t\t\tcommand_line,\n>   \t\t\tdirty ? _(\"and made changes to the index and/or the \"\n>   \t\t\t\t\"working tree.\\n\") : \"\");\n> @@ -3897,7 +3899,9 @@ static int do_exec(struct repository *r, const char *command_line, int quiet)\n>   \t\t\t  \"Commit or stash your changes, and then run\\n\"\n>   \t\t\t  \"\\n\"\n>   \t\t\t  \"  git rebase --continue\\n\"\n> -\t\t\t  \"\\n\"), command_line);\n> +\t\t\t  \"\\n\"\n> +\t\t\t  \"To abort and get back to the state before \\\"git rebase\\\", run \"\n> +\t\t\t  \"\\\"git rebase --abort\\\".\\n\"), command_line);\n>   \t\tstatus = 1;\n>   \t}\n>   \n> diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\n> index 08e82f7914..ca7ef66ae3 100755\n> --- a/t/t7512-status-help.sh\n> +++ b/t/t7512-status-help.sh\n> @@ -206,6 +206,7 @@ No commands remaining.\n>   You are currently editing a commit while rebasing branch '\\''rebase_i_edit'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -240,6 +241,7 @@ Next command to do (1 remaining command):\n>     (use \"git rebase --edit-todo\" to view and edit)\n>   You are currently splitting a commit while rebasing branch '\\''split_commit'\\'' on '\\''$ONTO'\\''.\n>     (Once your working directory is clean, run \"git rebase --continue\")\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   Changes not staged for commit:\n>     (use \"git add <file>...\" to update what will be committed)\n> @@ -278,6 +280,7 @@ No commands remaining.\n>   You are currently editing a commit while rebasing branch '\\''amend_last'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -317,6 +320,7 @@ Next command to do (1 remaining command):\n>   You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -347,6 +351,7 @@ Next command to do (1 remaining command):\n>     (use \"git rebase --edit-todo\" to view and edit)\n>   You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n>     (Once your working directory is clean, run \"git rebase --continue\")\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   Changes not staged for commit:\n>     (use \"git add <file>...\" to update what will be committed)\n> @@ -383,6 +388,7 @@ Next command to do (1 remaining command):\n>   You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -414,6 +420,7 @@ Next command to do (1 remaining command):\n>   You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -445,6 +452,7 @@ Next command to do (1 remaining command):\n>     (use \"git rebase --edit-todo\" to view and edit)\n>   You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n>     (Once your working directory is clean, run \"git rebase --continue\")\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   Changes not staged for commit:\n>     (use \"git add <file>...\" to update what will be committed)\n> @@ -482,6 +490,7 @@ Next command to do (1 remaining command):\n>   You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -515,6 +524,7 @@ Next command to do (1 remaining command):\n>   You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -548,6 +558,7 @@ Next command to do (1 remaining command):\n>     (use \"git rebase --edit-todo\" to view and edit)\n>   You are currently splitting a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n>     (Once your working directory is clean, run \"git rebase --continue\")\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   Changes not staged for commit:\n>     (use \"git add <file>...\" to update what will be committed)\n> @@ -587,6 +598,7 @@ Next command to do (1 remaining command):\n>   You are currently editing a commit while rebasing branch '\\''several_edits'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -718,6 +730,7 @@ No commands remaining.\n>   You are currently editing a commit while rebasing branch '\\''bisect'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   You are currently bisecting, started from branch '\\''bisect_while_rebasing'\\''.\n>     (use \"git bisect reset\" to get back to the original branch)\n> @@ -987,6 +1000,7 @@ No commands remaining.\n>   You are currently editing a commit while rebasing branch '\\''several_commits'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -1015,6 +1029,7 @@ Next commands to do (2 remaining commands):\n>   You are currently editing a commit while rebasing branch '\\''several_commits'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -1044,6 +1059,7 @@ Next commands to do (2 remaining commands):\n>   You are currently editing a commit while rebasing branch '\\''several_commits'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> @@ -1064,6 +1080,7 @@ Next command to do (1 remaining command):\n>   You are currently editing a commit while rebasing branch '\\''several_commits'\\'' on '\\''$ONTO'\\''.\n>     (use \"git commit --amend\" to amend the current commit)\n>     (use \"git rebase --continue\" once you are satisfied with your changes)\n> +  (use \"git rebase --abort\" to check out the original branch)\n>   \n>   nothing to commit (use -u to show untracked files)\n>   EOF\n> diff --git a/wt-status.c b/wt-status.c\n> index b17372390c..94fd14a058 100644\n> --- a/wt-status.c\n> +++ b/wt-status.c\n> @@ -1527,9 +1527,12 @@ static void show_rebase_in_progress(struct wt_status *s,\n>   \t\telse\n>   \t\t\tstatus_printf_ln(s, color,\n>   \t\t\t\t\t _(\"You are currently splitting a commit during a rebase.\"));\n> -\t\tif (s->hints)\n> +\t\tif (s->hints) {\n>   \t\t\tstatus_printf_ln(s, color,\n>   \t\t\t\t_(\"  (Once your working directory is clean, run \\\"git rebase --continue\\\")\"));\n> +\t\t\tstatus_printf_ln(s, color,\n> +\t\t\t\t_(\"  (use \\\"git rebase --abort\\\" to check out the original branch)\"));\n> +\t\t}\n>   \t} else {\n>   \t\tif (s->state.branch)\n>   \t\t\tstatus_printf_ln(s, color,\n> @@ -1544,6 +1547,8 @@ static void show_rebase_in_progress(struct wt_status *s,\n>   \t\t\t\t_(\"  (use \\\"git commit --amend\\\" to amend the current commit)\"));\n>   \t\t\tstatus_printf_ln(s, color,\n>   \t\t\t\t_(\"  (use \\\"git rebase --continue\\\" once you are satisfied with your changes)\"));\n> +\t\t\tstatus_printf_ln(s, color,\n> +\t\t\t\t_(\"  (use \\\"git rebase --abort\\\" to check out the original branch)\"));\n>   \t\t}\n>   \t}\n>   \twt_longstatus_print_trailer(s);\n> \n> base-commit: ea97ad8d017de0c9037451a78008a0fd60abea0c\n\n"},{"id":"545674","messageId":"xmqqpl1q2xw5.fsf@gitster.g","threadId":"65817","inReplyTo":"89d72342-5aa1-4dcf-951b-d0c791f91738@gmail.com","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-06-16T17:33:30Z","receivedAt":"2026-06-16T17:33:32Z","isPatch":true,"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> Hi Harald\n>\n> On 15/06/2026 20:19, Harald Nordgren via GitGitGadget wrote:\n>> From: Harald Nordgren <haraldnordgren@gmail.com>\n>> \n>> The warning shown when an \"exec\" step fails and the \"git status\"\n>> advice while splitting or editing a commit pointed users at \"git\n>> rebase --continue\" but not \"--abort\". Mention it in both, matching\n>> the conflict case.\n>\n> I'm not sure that the \"failed exec\" and \"conflicts\" cases are equivalent \n> though. If you have some nasty conflict that you don't want to resolve \n> then aborting and trying another approach such is incrementally rebasing \n> is the only option. If an exec command fails then it likely means that a \n> test has failed or some something similar which is minor inconvenience \n> which needs fixing before continuing - it seems very unlikely that the \n> user would want to abort the rebase.\n\nIt is very true that users who know what they are doing and got into\nsuch conflicts are opted to go into such a situation tnat it is\nunlikely that they would appreciate a choice to abort.\n\nBut given that for any system, everybody starts as a newbie, it may\nbe assuring to always give \"here is a way out\" option when they get\nin a nasty confusing situation.  Discouraging the way to use the\ntool that can lead to confusing situation by guiding them with BCP\nworkflows would help, but they always get into pitfall.\n\nThe patch adds new message into the existing message to suggest how\nto move forward, but as a training wheel option, it may not be a bad\nthing to offer \"--abort\" as an extra hint, separate from the\nexisting warning() message.\n\n"},{"id":"545739","messageId":"CAHwyqnW=rfXhSw+Xa5r148W1cxrXD48vKC=DSTMTCTyx53WcnA@mail.gmail.com","threadId":"65817","inReplyTo":"xmqqpl1q2xw5.fsf@gitster.g","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2026-06-17T08:56:27Z","receivedAt":"2026-06-17T08:57:05Z","isPatch":true,"body":"For the record, I have gotten into ill-fated rebases, and then it\nwould have been nice to have that message there. Sometimes you realize\nafter starting that you chose the wrong upstream, etc.\n\n\nHarald\n"},{"id":"545743","messageId":"bd7dc183-6597-4fd0-ae64-682d46480cd4@gmail.com","threadId":"65817","inReplyTo":"xmqqpl1q2xw5.fsf@gitster.g","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2026-06-17T09:52:28Z","receivedAt":"2026-06-17T09:52:30Z","isPatch":true,"body":"On 16/06/2026 18:33, Junio C Hamano wrote:\n> Phillip Wood <phillip.wood123@gmail.com> writes:\n> \n>> Hi Harald\n>>\n>> On 15/06/2026 20:19, Harald Nordgren via GitGitGadget wrote:\n>>> From: Harald Nordgren <haraldnordgren@gmail.com>\n>>>\n>>> The warning shown when an \"exec\" step fails and the \"git status\"\n>>> advice while splitting or editing a commit pointed users at \"git\n>>> rebase --continue\" but not \"--abort\". Mention it in both, matching\n>>> the conflict case.\n>>\n>> I'm not sure that the \"failed exec\" and \"conflicts\" cases are equivalent\n>> though. If you have some nasty conflict that you don't want to resolve\n>> then aborting and trying another approach such is incrementally rebasing\n>> is the only option. If an exec command fails then it likely means that a\n>> test has failed or some something similar which is minor inconvenience\n>> which needs fixing before continuing - it seems very unlikely that the\n>> user would want to abort the rebase.\n> \n> It is very true that users who know what they are doing and got into\n> such conflicts are opted to go into such a situation tnat it is\n> unlikely that they would appreciate a choice to abort.\n\nThat's not quite what I was trying to say which was that aborting in the \ncase of conflicts is more likely than in the case of a failed exec.\n\n> But given that for any system, everybody starts as a newbie, it may\n> be assuring to always give \"here is a way out\" option when they get\n> in a nasty confusing situation.  Discouraging the way to use the\n> tool that can lead to confusing situation by guiding them with BCP\n> workflows would help, but they always get into pitfall.\n> \n> The patch adds new message into the existing message to suggest how\n> to move forward, but as a training wheel option, it may not be a bad\n> thing to offer \"--abort\" as an extra hint, separate from the\n> existing warning() message.\n\nSo if I've understood we'd print a message explaining what's happened \nand how to continue followed by a hint about aborting. The message would \ndepend on what problem caused the rebase to stop, but the hint would be \nthe same in each case. That sounds fine to me.\n\nThanks\n\nPhillip\n\n"},{"id":"545762","messageId":"xmqqo6h9z7e6.fsf@gitster.g","threadId":"65817","inReplyTo":"bd7dc183-6597-4fd0-ae64-682d46480cd4@gmail.com","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-06-17T12:19:29Z","receivedAt":"2026-06-17T12:19:31Z","isPatch":true,"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n>> It is very true that users who know what they are doing and got into\n>> such conflicts are opted to go into such a situation tnat it is\n>> unlikely that they would appreciate a choice to abort.\n>\n> That's not quite what I was trying to say which was that aborting in the \n> case of conflicts is more likely than in the case of a failed exec.\n\nAh, I misread the intention.  And I agree with you that \"failed\ntest\" case is very likely to lead to \"further changes/amends\" and\nnot \"aborted rebase\".\n\n> So if I've understood we'd print a message explaining what's happened \n> and how to continue followed by a hint about aborting. The message would \n> depend on what problem caused the rebase to stop, but the hint would be \n> the same in each case. That sounds fine to me.\n\nYeah, and \"failed test\" would not be one of the problem that would\ninvite the hint to \"abort\".  I am OK with that, too.  FWIW, I am OK\nif the \"you can abort\" hint cannot be configured away, either ;-)\n\n"},{"id":"545886","messageId":"CAHwyqnV8je6gCTExr=CFCdYskN1dVaEDVSKDLUo5A4Ukv=qhiA@mail.gmail.com","threadId":"65817","inReplyTo":"xmqqo6h9z7e6.fsf@gitster.g","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2026-06-18T18:49:17Z","receivedAt":"2026-06-18T18:49:56Z","isPatch":true,"body":"Just an example when working on a different topic:\n\nI rebased with -x to run all the tests, but ran a test that didn't\nexist yet on the first commit and ended up in a bad state. Here it\nshould clearly show the 'git rebase --abort', so I can start over,\nit's not something to fix:\n\n```\n$ git rebase --keep-base -x 'make -s' -x 'cd t && prove -j8\nt3454-history-squash.sh t3453-history-fixup.sh t3452-history-split.sh\nt3451-history-reword.sh t3450-history.sh'\nExecuting: make -s\nGIT_VERSION=2.55.0.rc1.20.g1e31474ef6\nExecuting: cd t && prove -j8 t3454-history-squash.sh\nt3453-history-fixup.sh t3452-history-split.sh t3451-history-reword.sh\nt3450-history.sh\nCannot detect source of 't3454-history-squash.sh'! at\n/System/Library/Perl/5.34/TAP/Parser/IteratorFactory.pm line 256.\n...\nwarning: execution failed: cd t && prove -j8 t3454-history-squash.sh\nt3453-history-fixup.sh t3452-history-split.sh t3451-history-reword.sh\nt3450-history.sh\nYou can fix the problem, and then run\n\n  git rebase --continue\n\n$ git status\ninteractive rebase in progress; onto 95e20213fa\nLast commands done (3 commands done):\n   exec make -s\n   exec cd t && prove -j8 t3454-history-squash.sh\nt3453-history-fixup.sh t3452-history-split.sh t3451-history-reword.sh\nt3450-history.sh\n  (see more in file .git/rebase-merge/done)\nNext commands to do (9 remaining commands):\n   pick 498da64046 # history: give commit_tree_ext a message template\n   exec make -s\n  (use \"git rebase --edit-todo\" to view and edit)\nYou are currently editing a commit while rebasing branch\n'rebase-fixup-fold' on '95e20213fa'.\n  (use \"git commit --amend\" to amend the current commit)\n  (use \"git rebase --continue\" once you are satisfied with your changes)\n\nnothing to commit, working tree clean\n```\n\n\nHarald\n\nOn Wed, Jun 17, 2026 at 2:19 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Phillip Wood <phillip.wood123@gmail.com> writes:\n>\n> >> It is very true that users who know what they are doing and got into\n> >> such conflicts are opted to go into such a situation tnat it is\n> >> unlikely that they would appreciate a choice to abort.\n> >\n> > That's not quite what I was trying to say which was that aborting in the\n> > case of conflicts is more likely than in the case of a failed exec.\n>\n> Ah, I misread the intention.  And I agree with you that \"failed\n> test\" case is very likely to lead to \"further changes/amends\" and\n> not \"aborted rebase\".\n>\n> > So if I've understood we'd print a message explaining what's happened\n> > and how to continue followed by a hint about aborting. The message would\n> > depend on what problem caused the rebase to stop, but the hint would be\n> > the same in each case. That sounds fine to me.\n>\n> Yeah, and \"failed test\" would not be one of the problem that would\n> invite the hint to \"abort\".  I am OK with that, too.  FWIW, I am OK\n> if the \"you can abort\" hint cannot be configured away, either ;-)\n>\n"},{"id":"545910","messageId":"xmqqa4srnwfa.fsf@gitster.g","threadId":"65817","inReplyTo":"CAHwyqnV8je6gCTExr=CFCdYskN1dVaEDVSKDLUo5A4Ukv=qhiA@mail.gmail.com","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-06-19T01:36:25Z","receivedAt":"2026-06-19T01:36:28Z","isPatch":true,"body":"Harald Nordgren <haraldnordgren@gmail.com> writes:\n\n> Just an example when working on a different topic:\n>\n> I rebased with -x to run all the tests, but ran a test that didn't\n> exist yet on the first commit and ended up in a bad state. Here it\n> should clearly show the 'git rebase --abort', so I can start over,\n> it's not something to fix:\n>\n> ```\n> $ git rebase --keep-base -x 'make -s' -x 'cd t && prove -j8\n> t3454-history-squash.sh t3453-history-fixup.sh t3452-history-split.sh\n> t3451-history-reword.sh t3450-history.sh'\n> Executing: make -s\n> GIT_VERSION=2.55.0.rc1.20.g1e31474ef6\n> Executing: cd t && prove -j8 t3454-history-squash.sh\n> t3453-history-fixup.sh t3452-history-split.sh t3451-history-reword.sh\n> t3450-history.sh\n> Cannot detect source of 't3454-history-squash.sh'! at\n> /System/Library/Perl/5.34/TAP/Parser/IteratorFactory.pm line 256.\n> ...\n> warning: execution failed: cd t && prove -j8 t3454-history-squash.sh\n> t3453-history-fixup.sh t3452-history-split.sh t3451-history-reword.sh\n> t3450-history.sh\n> You can fix the problem, and then run\n>\n>   git rebase --continue\n\nHmph, you do not have to \"fix\" as you know some of the test scripts\ndid not exist at this stage.  So the solution to the issue seems to\nbe just to say \"git rebase --continue\", instead of starting over by\naborting.  It is especially true if the test scripts are introduced\nin the middle of this rebase session somewhere later in the series,\nno?\n\nOf course if you gave a totally broken script to \"-x\" option, you'd\nneed to be able to abort it, but is that the use case we should be\ngiving one extra line of output for users in all other situations?\nI dunno.\n"},{"id":"548367","messageId":"CAHwyqnVy=4oHBTmtDJ6jX38Kh1aLYYXHR-_12DdiiUxpXZ5kNg@mail.gmail.com","threadId":"65817","inReplyTo":"xmqqa4srnwfa.fsf@gitster.g","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2026-07-16T06:02:45Z","receivedAt":"2026-07-16T06:03:23Z","isPatch":true,"body":"I'll revive this discussion because the 'git rebase --keep-base -x'\ncase still bothers me.\n\nWhen getting stuck in the middle of an operation, it just makes sense\nto offer a way forward and a way back, why be more obtuse than we need\nto?\n\n\nHarald\n"},{"id":"548390","messageId":"4d150f21-46ea-4bf7-b516-c1763c152b34@gmail.com","threadId":"65817","inReplyTo":"CAHwyqnVy=4oHBTmtDJ6jX38Kh1aLYYXHR-_12DdiiUxpXZ5kNg@mail.gmail.com","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2026-07-16T09:37:22Z","receivedAt":"2026-07-16T09:37:28Z","isPatch":true,"body":"Hi Harald\n\nOn 16/07/2026 07:02, Harald Nordgren wrote:\n> I'll revive this discussion because the 'git rebase --keep-base -x'\n> case still bothers me.\n> \n> When getting stuck in the middle of an operation, it just makes sense\n> to offer a way forward and a way back, why be more obtuse than we need\n> to?\n\nI'm still not clear why you'd want to abort after a failed exec. In the \nexample you gave earlier in the thread where the exec command was trying \nto run a command that did not exist isn't the solution to edit the todo \nlist to fix that, or if just this exec command is wrong, continue the \nrebase?\n\nIn the latter case it would  be useful is to teach \"git rebase --skip\" \nto skip a failed exec command that has been rescheduled by \n\"--reschedule-failed-exec\" and provide a hint to the user that they can \nskip the rescheduled command. We could potentially add a hint to suggest \nthat if the failure was due to a bad command then the user should edit \nthe todo list.\n\nTo me aborting a rebase because an exec command failed is almost never a \nsensible route forward and we should not be encouraging users to abort \nafter a failed test - surely the sensible thing to do in that case is \nfix the problem with \"git commit --amend\" and continue the rebase.\n\nThanks\n\nPhillip\n\n"},{"id":"548439","messageId":"xmqqmrvqhmpp.fsf@gitster.g","threadId":"65817","inReplyTo":"4d150f21-46ea-4bf7-b516-c1763c152b34@gmail.com","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-16T17:24:18Z","receivedAt":"2026-07-16T17:24:20Z","isPatch":true,"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> To me aborting a rebase because an exec command failed is almost never a \n> sensible route forward and we should not be encouraging users to abort \n> after a failed test - surely the sensible thing to do in that case is \n> fix the problem with \"git commit --amend\" and continue the rebase.\n\nMy conclusion, from my own experience with \"git rebase\", is the\nsame.\n\nI wonder if the workflow that benefits from this \"if exec fails,\ngive up and forget the whole thing\" behavior is actually quite\ndifferent from what we consider the \"normal\" use of the command?\nPerhaps the user is not interested in \"rebasing\" the history at\nall, but is instead running a check on each and every commit.\nThat is, a more expensive version of:\n\n        for commit in $(git rev-list bottom..top)\n        do\n                git reset --hard \"$commit\" &&\n                do the exec command || break\n        done\n\nthat just happens to be shorter to type?\n"},{"id":"548571","messageId":"CAHwyqnVwDsdvvg6a2BtAYw+hYRdgKvRXwHE+uzAZjherfu5B=Q@mail.gmail.com","threadId":"65817","inReplyTo":"xmqqmrvqhmpp.fsf@gitster.g","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2026-07-18T08:05:51Z","receivedAt":"2026-07-18T08:06:29Z","isPatch":true,"body":"> I wonder if the workflow that benefits from this \"if exec fails,\n> give up and forget the whole thing\" behavior is actually quite\n> different from what we consider the \"normal\" use of the command?\n> Perhaps the user is not interested in \"rebasing\" the history at\n> all, but is instead running a check on each and every commit.\n> That is, a more expensive version of:\n>\n>         for commit in $(git rev-list bottom..top)\n>         do\n>                 git reset --hard \"$commit\" &&\n>                 do the exec command || break\n>         done\n>\n> that just happens to be shorter to type?\n\nSure, that's exactly right.\n\n\nHarald\n"},{"id":"548581","messageId":"9a0b542c-8984-4d73-8e24-00adf6dcd427@gmail.com","threadId":"65817","inReplyTo":"CAHwyqnVwDsdvvg6a2BtAYw+hYRdgKvRXwHE+uzAZjherfu5B=Q@mail.gmail.com","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2026-07-18T09:25:56Z","receivedAt":"2026-07-18T09:26:02Z","isPatch":true,"body":"On 18/07/2026 09:05, Harald Nordgren wrote:\n>> I wonder if the workflow that benefits from this \"if exec fails,\n>> give up and forget the whole thing\" behavior is actually quite\n>> different from what we consider the \"normal\" use of the command?\n>> Perhaps the user is not interested in \"rebasing\" the history at\n>> all, but is instead running a check on each and every commit.\n>> That is, a more expensive version of:\n>>\n>>          for commit in $(git rev-list bottom..top)\n>>          do\n>>                  git reset --hard \"$commit\" &&\n>>                  do the exec command || break\n>>          done\n>>\n>> that just happens to be shorter to type?\n>> Sure, that's exactly right.\nI think I must be missing something; I had assumed that someone running \na check on each commit wanted to ensure it passed, and, if not, they \nwould want to fix the problem that caused the check to fail. In that \ncase I would expect that they would want to amend the failing commit, \nrather than abort the rebase. What's the scenario where one wants to \ncheck a bunch of commits but not fix the ones that fail?\n\nThanks\n\nPhillip\n\n"},{"id":"548644","messageId":"xmqq8q76jsvk.fsf@gitster.g","threadId":"65817","inReplyTo":"9a0b542c-8984-4d73-8e24-00adf6dcd427@gmail.com","subject":"Re: [PATCH] rebase: mention --abort alongside --continue","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-20T02:29:35Z","receivedAt":"2026-07-20T02:29:38Z","isPatch":true,"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n>>> Perhaps the user is not interested in \"rebasing\" the history at\n>>> all, but is instead running a check on each and every commit.\n>>> That is, a more expensive version of:\n>>>\n>>>          for commit in $(git rev-list bottom..top)\n>>>          do\n>>>                  git reset --hard \"$commit\" &&\n>>>                  do the exec command || break\n>>>          done\n>>>\n>>> that just happens to be shorter to type?\n>>> Sure, that's exactly right.\n\n> I think I must be missing something; I had assumed that someone running \n> a check on each commit wanted to ensure it passed, and, if not, they \n> would want to fix the problem that caused the check to fail. In that \n> case I would expect that they would want to amend the failing commit, \n> rather than abort the rebase. What's the scenario where one wants to \n> check a bunch of commits but not fix the ones that fail?\n\nI suspect that is what makes this user \"not interested in\n'rebasing'\".  If finding a single breakage in the history is all\nthey want to accomplish (perhaps because they merely file a bug\nreport and make it someone else's job to fix it), they have no\ndesire to amend and continue the run to find further problems in\nsubsequent commits.\n\nWhich, of course, makes me even less sympathetic to the proposed\nchange.\n\nThanks.\n"}]}