rebase -i: improve advice on bad instruction lines
PATCH 1/1 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.
--- git-rebase--interactive.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
git-rebase--interactive.sh +1 -1
@@ -1041,7 +1041,7 @@ The possible behaviours are: ignore, warn, error.")" # placed before the commit of the next action checkout_onto - warn "$(gettext "You can fix this with 'git rebase --edit-todo'.")" + warn "$(gettext "You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.")" die "$(gettext "Or you can abort the rebase with 'git rebase --abort'.")" fi }
Signature · 1 line
2.10.0.304.gf2ff484
2016-09-06 20:08 GMT+02:00 Ralf Thielow <[email protected]>:
git-rebase--interactive.sh The possible behaviours are: ignore, warn, error.")" · line 1045
Quoted 3 lines
git-rebase--interactive.sh +1
-1- warn "$(gettext "You can fix this with 'git rebase --edit-todo'.")" + warn "$(gettext "You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.")" die "$(gettext "Or you can abort the rebase with 'git rebase --abort'.")"
Please don't apply as is. There are some test failures due to the text change. I'll send an updated version.
PATCH v2 1/1 rebase -i: improve advice on bad instruction lines
In reply to Ralf ThielowIf 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.
---
Changes in v2:
- adjust tests
git-rebase--interactive.sh | 2 +- t/t3404-rebase-interactive.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
git-rebase--interactive.sh +1 -1
@@ -1041,7 +1041,7 @@ The possible behaviours are: ignore, warn, error.")" # placed before the commit of the next action checkout_onto - warn "$(gettext "You can fix this with 'git rebase --edit-todo'.")" + warn "$(gettext "You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.")" die "$(gettext "Or you can abort the rebase with 'git rebase --abort'.")" fi }
t/t3404-rebase-interactive.sh +3 -3
@@ -1195,7 +1195,7 @@ To avoid this message, use "drop" to explicitly remove a commit. Use 'git config rebase.missingCommitsCheck' to change the level of warnings. The possible behaviours are: ignore, warn, error. -You can fix this with 'git rebase --edit-todo'. +You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'. Or you can abort the rebase with 'git rebase --abort'. EOF
@@ -1219,7 +1219,7 @@ cat >expect <<EOF Warning: the command isn't recognized in the following line: - badcmd $(git rev-list --oneline -1 master~1) -You can fix this with 'git rebase --edit-todo'. +You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'. Or you can abort the rebase with 'git rebase --abort'. EOF
@@ -1254,7 +1254,7 @@ cat >expect <<EOF Warning: the SHA-1 is missing or isn't a commit in the following line: - edit XXXXXXX False commit -You can fix this with 'git rebase --edit-todo'. +You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'. Or you can abort the rebase with 'git rebase --abort'. EOF
Signature · 1 line
2.10.0.304.gf2ff484.dirty
Hi Ralf,
There are quite a few patch series in flight these days around interactive rebase. Have you checked for conflicts with those?
Quoted 70 lines · Ralf Thielow
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]>---
Changes in v2:
- adjust testsgit-rebase--interactive.sh | 2 +-
t/t3404-rebase-interactive.sh | 6 +++---2 files changed, 4 insertions(+), 4 deletions(-)git-rebase--interactive.sh +0
-0@@ -1041,7 +1041,7 @@ The possible behaviours are: ignore, warn,error.")"
# placed before the commit of the next action checkout_ontogit-rebase--interactive.sh +1
-3- warn "$(gettext "You can fix this with 'git rebase --edit-todo'.")" + warn "$(gettext "You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.")"die "$(gettext "Or you can abort the rebase with 'git rebase --abort'.")"
fi
}t/t3404-rebase- renamed from t/t3404-rebase-interactive.sh +0
-0
interactive.sh
index 597e94e..e38e296 100755t/t3404-rebase-interactive.sh +0
-0@@ -1195,7 +1195,7 @@ To avoid this message, use "drop" to explicitlyremove a commit.
Use 'git config rebase.missingCommitsCheck' to change the level of warnings.
The possible behaviours are: ignore, warn, error.t/t3404-rebase-interactive.sh +1
-1-You can fix this with 'git rebase --edit-todo'. +You can fix this with 'git rebase --edit-todo' and then run 'gitrebase --continue'.
Or you can abort the rebase with 'git rebase --abort'. EOFt/t3404-rebase-interactive.sh +0
-0@@ -1219,7 +1219,7 @@ cat >expect <<EOFWarning: the command isn't recognized in the following line:
- badcmd $(git rev-list --oneline -1 master~1)t/t3404-rebase-interactive.sh +1
-1-You can fix this with 'git rebase --edit-todo'. +You can fix this with 'git rebase --edit-todo' and then run 'gitrebase --continue'.
Or you can abort the rebase with 'git rebase --abort'. EOFt/t3404-rebase-interactive.sh +0
-0@@ -1254,7 +1254,7 @@ cat >expect <<EOFWarning: the SHA-1 is missing or isn't a commit in the following line:
- edit XXXXXXX False committ/t3404-rebase-interactive.sh +1
-1-You can fix this with 'git rebase --edit-todo'. +You can fix this with 'git rebase --edit-todo' and then run 'gitrebase --continue'.
Or you can abort the rebase with 'git rebase --abort'. EOF
2016-09-07 11:28 GMT+02:00 Dennis Kaarsemaker <[email protected]>:
Quoted 5 lines
Hi Ralf,
There are quite a few patch series in flight these days around interactive rebase. Have you checked for conflicts with those?
Thanks. I did not check against 'pu' when I created this patch but I'm able to apply without any conflicts.
Hi Ralf,
Quoted 9 lines · Ralf Thielow
2016-09-07 11:28 GMT+02:00 Dennis Kaarsemaker <[email protected]>:
Quoted 5 lines
Hi Ralf,
There are quite a few patch series in flight these days around interactive rebase. Have you checked for conflicts with those?
Thanks. I did not check against 'pu' when I created this patch but I'm able to apply without any conflicts.
Yeah, rewrites in C won't conflict with your patches. If you rebase interactively, the worst that will happen is that you update code that was moved into contrib/...
Ciao,
Johannes
Quoted 2 lines · Dennis Kaarsemaker
There are quite a few patch series in flight these days around interactive rebase. Have you checked for conflicts with those?
IIRC, Ralf's fix would need to be ported to C version, and when it happens, it won't just be a mere conflict but will disappear from the scripted version ;-)
But the C version is not anywhere near 'pu' yet and being rerolled, so I do not mind queuing it on 'pu' now merely as a reminder.