Skip to content

Commit 37875b4

Browse files
ralfthgitster
authored andcommitted
rebase -i: improve advice on bad instruction lines
If we found bad instruction lines in the instruction sheet of interactive rebase, we give the user advice on how to fix it. However, we don't tell the user what to do afterwards. Give the user advice to run 'git rebase --continue' after the fix. Signed-off-by: Ralf Thielow <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6ebdac1 commit 37875b4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

git-rebase--interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ The possible behaviours are: ignore, warn, error.")"
10411041
# placed before the commit of the next action
10421042
checkout_onto
10431043

1044-
warn "$(gettext "You can fix this with 'git rebase --edit-todo'.")"
1044+
warn "$(gettext "You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.")"
10451045
die "$(gettext "Or you can abort the rebase with 'git rebase --abort'.")"
10461046
fi
10471047
}

t/t3404-rebase-interactive.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ To avoid this message, use "drop" to explicitly remove a commit.
11951195
Use 'git config rebase.missingCommitsCheck' to change the level of warnings.
11961196
The possible behaviours are: ignore, warn, error.
11971197
1198-
You can fix this with 'git rebase --edit-todo'.
1198+
You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
11991199
Or you can abort the rebase with 'git rebase --abort'.
12001200
EOF
12011201

@@ -1219,7 +1219,7 @@ cat >expect <<EOF
12191219
Warning: the command isn't recognized in the following line:
12201220
- badcmd $(git rev-list --oneline -1 master~1)
12211221
1222-
You can fix this with 'git rebase --edit-todo'.
1222+
You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
12231223
Or you can abort the rebase with 'git rebase --abort'.
12241224
EOF
12251225

@@ -1254,7 +1254,7 @@ cat >expect <<EOF
12541254
Warning: the SHA-1 is missing or isn't a commit in the following line:
12551255
- edit XXXXXXX False commit
12561256
1257-
You can fix this with 'git rebase --edit-todo'.
1257+
You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
12581258
Or you can abort the rebase with 'git rebase --abort'.
12591259
EOF
12601260

0 commit comments

Comments
 (0)