git-rebase -i: have an option for amending the commit message only.
PATCH 1/1 git-rebase -i: have an option for amending the commit message only.
--- git-rebase--interactive.sh | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
git-rebase--interactive.sh +10 -0
@@ -215,6 +215,15 @@ do_next () { pick_one $sha1 || die_with_patch $sha1 "Could not apply $sha1... $rest" ;; + comment|c) + comment_for_reflog comment + + mark_action_done + pick_one $sha1 || + die_with_patch $sha1 "Could not apply $sha1... $rest" + output git commit --no-verify --amend -e -C HEAD + ;; + edit|e) comment_for_reflog edit
@@ -688,6 +697,7 @@ do # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending +# c, comment = use commit, but stop for changing the commit message # s, squash = use commit, but meld into previous commit # mark :mark = mark the current HEAD for later reference # reset commit = reset HEAD to the commit
Signature · 1 line
1.5.6.rc2.128.g6656e
PATCH 1/1 git-rebase -i: improve help readability
--- git-rebase--interactive.sh | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-)
git-rebase--interactive.sh +10 -9
@@ -695,15 +695,16 @@ do # to a commit previously marked with the 'mark' insn. # # Commands: -# p, pick = use commit -# e, edit = use commit, but stop for amending -# c, comment = use commit, but stop for changing the commit message -# s, squash = use commit, but meld into previous commit -# mark :mark = mark the current HEAD for later reference -# reset commit = reset HEAD to the commit -# merge commit-M commit-P ... = redo merge commit-M with the -# current HEAD and the parents commit-P -# tag = reset tag to the current HEAD +# p, pick use commit +# e, edit use commit, but stop for amending +# c, comment use commit, but update the commit message on the way +# s, squash use commit, but meld into previous commit +# mark :mark mark the current HEAD for later reference +# reset commit reset HEAD to the commit +# merge commit-M commit-P +# redo merge commit-M with the current HEAD +# and the parents commit-P +# tag reset tag to the current HEAD # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted.
Signature · 1 line
1.5.6.rc2.128.g6656e
Hi,
I like the feature and I have just two comments:
git-rebase--interactive.sh do_next () { · line 218
Quoted 2 lines · Pierre Habouzit
git-rebase--interactive.sh +1
-0+ comment|c)
Is "comment" the right name? I'm not sure, I just ask.
git-rebase--interactive.sh do_next () { · line 224
Quoted 6 lines
git-rebase--interactive.sh +6
-0+ comment_for_reflog comment + + mark_action_done + pick_one $sha1 || + die_with_patch $sha1 "Could not apply $sha1... $rest" + output git commit --no-verify --amend -e -C HEAD
It does not work with an editor that opens in the current terminal like vi. Just remove "output" should fix the problem, I think.
Olivier.
Quoted 9 lines · Olivier Marin
Hi,
I like the feature and I have just two comments:
git-rebase--interactive.sh do_next () { · line 218
Quoted 2 lines · Pierre Habouzit
git-rebase--interactive.sh +1
-0+ comment|c)Is "comment" the right name? I'm not sure, I just ask.
Well, edit would have been better, but it's taken already. 'message'
has m as a shortcut, already taken by merge, so 'comment' felt like the best I could come up with.
To be fair, if someone has a better name, I'm all for it. I quite care
about the feature, edit needs me to run the --amend myself, whereas I often just want to fix a typo in a commit log.
Quoted 9 lines
git-rebase--interactive.sh do_next () { · line 224
Quoted 6 lines
git-rebase--interactive.sh +6
-0+ comment_for_reflog comment + + mark_action_done + pick_one $sha1 || + die_with_patch $sha1 "Could not apply $sha1... $rest" + output git commit --no-verify --amend -e -C HEADIt does not work with an editor that opens in the current terminal like vi. Just remove "output" should fix the problem, I think.
I'm surprised because I used it this way, but maybe it was on the
machine where my git editor is gvim and not vim …
Signature · 3 lines
·O· Pierre Habouzit ··O [email protected] OOO http://www.madism.org
Hi,
I want to add a quick note as the one who is currently responsible for future git-sequencer ;-)
Quoted 6 lines
Quoted 6 lines
git-rebase--interactive.sh do_next () { · line 224
Quoted 6 lines
git-rebase--interactive.sh +6
-0+ comment_for_reflog comment + + mark_action_done + pick_one $sha1 || + die_with_patch $sha1 "Could not apply $sha1... $rest" + output git commit --no-verify --amend -e -C HEAD
I dislike that "comment" does a pick.
Well, your version is consistent with the rest of rebase-i, but inconsistent to the more atomic and general approach of the git-sequencer thread.
You use
comment deadf00
instead of
pick deadf00
Would you mind if you had to use something like this:
pick deadf00
comment
to reedit the message of deadf00?
The difference for you as vim user is that you won't type "<Home> c w comment", but "o comment" :-)
The outcome is that you can also use it for patches, not only for cherry-picks ;)
Quoted 1 line
To be fair, if someone has a better name, I'm all for it.
What about "amend"? :)
...or "amend-message" or something like this.
Quoted 2 lines
I quite care about the feature, edit needs me to run the --amend myself, whereas I often just want to fix a typo in a commit log.
I understand ;)
Well, I like to add it to the sequencer spec and to the prototype as soon as the name is clear ;-)
Regards,
Stephan
Signature · 1 line
Stephan Beyer <[email protected]>, PGP 0x6EDDD207FCC5040F