From: Kevin Ballard <hidden> Date: 2016-06-15 22:49:58
Add a new command "shell", which takes an option commit. It simply exits
to the shell with the commit (if given) and a message telling the user how
to resume the rebase. This is effectively the same thing as "x false" but
much friendlier to the user.
Signed-off-by: Kevin Ballard <redacted>
---
I discovered the need for this when I wanted to edit a commit, but apply
a fixup first. The only way with the existing tools was an exec command
that fails (e.g. "x false").
git-rebase--interactive.sh | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
@@ -566,6 +566,26 @@ do_next () {exit1fi;;+!|"shell")+read-rcommandcomment<"$TODO"+mark_action_done+# can't use $sha1 here for same reason as "exec"+line=$(gitrev-list--pretty=oneline-1--abbrev-commit--abbrev=7HEAD)+sha1="${line%% *}"+rest="${line#* }"+echo"$sha1">"$DOTEST"/stopped-sha+warn"Stopped at $sha1... $rest"+iftest-n"$comment";then+warn+warn" $comment"+fi+warn+warn"Once you are ready to continue, run"+warn+warn" git rebase --continue"+warn+exit0+;;*)warn"Unknown command: $command$sha1$rest"ifgitrev-parse--verify-q"$sha1">/dev/null
@@ -1007,6 +1027,7 @@ first and then run 'git rebase --continue' again."# s, squash = use commit, but meld into previous commit# f, fixup = like "squash", but discard this commit's log message# x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails+# !, shell = Exit to the shell## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.
From: Kevin Ballard <hidden> Date: 2016-06-15 22:49:58
On Nov 3, 2010, at 10:17 PM, Kevin Ballard wrote:
Add a new command "shell", which takes an option commit. It simply exits
to the shell with the commit (if given) and a message telling the user how
to resume the rebase. This is effectively the same thing as "x false" but
much friendlier to the user.
That was supposed to say "optional comment", not "option commit". And again
below, "comment" not "commit".
-Kevin Ballard
From: Erik Faye-Lund <hidden> Date: 2016-06-15 22:49:58
On Thu, Nov 4, 2010 at 6:17 AM, Kevin Ballard [off-list ref] wrote:
Add a new command "shell", which takes an option commit. It simply exits
to the shell with the commit (if given) and a message telling the user how
to resume the rebase. This is effectively the same thing as "x false" but
much friendlier to the user.
I'm sorry if I'm missing something, but how is this different from "edit"?
From: Kevin Ballard <hidden> Date: 2016-06-15 22:49:58
On Nov 4, 2010, at 2:36 AM, Erik Faye-Lund wrote:
On Thu, Nov 4, 2010 at 6:17 AM, Kevin Ballard [off-list ref] wrote:
quoted
Add a new command "shell", which takes an option commit. It simply exits
to the shell with the commit (if given) and a message telling the user how
to resume the rebase. This is effectively the same thing as "x false" but
much friendlier to the user.
I'm sorry if I'm missing something, but how is this different from "edit"?
Edit cherry-picks a commit, then exits to the shell. I needed to exit to the
shell without cherry-picking a commit. As stated in the comments above the
diffstat on the patch, the original use case here was something along the
lines of
edit 12345 some commit
fixup 23456 another commit
shell I want to amend the commit after the fixup
-Kevin Ballard
I'm sorry if I'm missing something, but how is this different from
"edit"?
Edit cherry-picks a commit, then exits to the shell. I needed to exit
to the shell without cherry-picking a commit.
Indeed, before "x false" was available, I had found out that "edit"
without an argument fails with a harmless error and indeed achieves that
"pause" mechanism which was really missing.
What about just fixing this so we can use "edit" ? Do we really need
another command here ?
--
Yann Dirson - Bertin Technologies
From: Erik Faye-Lund <hidden> Date: 2016-06-15 22:49:58
On Thu, Nov 4, 2010 at 11:25 AM, Yann Dirson [off-list ref] wrote:
quoted
quoted
I'm sorry if I'm missing something, but how is this different from
"edit"?
Edit cherry-picks a commit, then exits to the shell. I needed to exit
to the shell without cherry-picking a commit.
Then you do "edit" on the preceding commit instead, no?
Indeed, before "x false" was available, I had found out that "edit"
without an argument fails with a harmless error and indeed achieves that
"pause" mechanism which was really missing.
What about just fixing this so we can use "edit" ? Do we really need
another command here ?
Having an parameter-less "edit" would indeed be a bit more convenient.
From: Eric Raible <hidden> Date: 2016-06-15 22:49:58
On 11:59 AM, Yann Dirson wrote:
quoted
quoted
I'm sorry if I'm missing something, but how is this different from
"edit"?
Edit cherry-picks a commit, then exits to the shell. I needed to exit
to the shell without cherry-picking a commit.
Indeed, before "x false" was available, I had found out that "edit"
without an argument fails with a harmless error and indeed achieves that
"pause" mechanism which was really missing.
What about just fixing this so we can use "edit" ? Do we really need
another command here ?