Skip to content

rebase -i: add options to fixup command

Charvi Mendiratta git 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest8 patches 7 repliesIn review
  2. v49 patches 18 repliesSuperseded
  3. v39 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v29 patches15 repliesSuperseded
v1 RFC9 patches21 repliesSuperseded

Changes in v5 from the cover letter

(Thanks to Eric Sunshine, Christian Couder and Phillip Wood for suggestions
and reviews)

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8rebase -i: only write fixup-message when it's neededsequencer.c+3 -40 replies
2/8sequencer: factor out code to append squash messagesequencer.c+12 -60 replies
3/8rebase -i: comment out squash!/fixup! subjects from squash messagesequencer.c t/t3415-rebase-autosquash.sh t/t3900-i18n-commit.sh+36 -190 replies
4/8sequencer: pass todo_item to do_pick_commit()sequencer.c+11 -70 replies
5/8sequencer: use const variable for commit message commentssequencer.c+10 -50 replies
6/8rebase -i: add fixup [-C | -c] commandrebase-interactive.c sequencer.c+195 -200 replies
7/8t3437: test script for fixup [-C|-c] options in interactive rebaset/lib-rebase.sh t/t3437-rebase-fixup-options.sh t/t3437/expected-combined-message+158 -20 replies
8/8doc/git-rebase: add documentation for fixup [-C|-c] optionsDocumentation/git-rebase.txt+10 -30 replies

Reviews trailers per patch

6 of 8 patches have a Reviewed-by or Acked-by.

PatchTaylor BlauPhillip WoodChristian CouderEric SunshineMarc Branchaud
1/8R-b
2/8
3/8R-b
4/8Mentored-by Mentored-by
5/8R-b Mentored-by Mentored-by
6/8Original-patch-by Mentored-by Mentored-by R-b
7/8Original-patch-by Mentored-by Mentored-by R-b
8/8Mentored-by Mentored-by R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/8][Outreachy] rebase -i: add options to fixup command

This patch series adds fixup [-C|-c] options to interactive rebase. In addition to amending the contents of the commit as the fixup command does now, fixup -C replaces the commit message of the original commit which we are fixing up with the message of the fixup commit. And to edit the fixup commit message before committing, fixup -c command is used instead of fixup -C. This convention is similar to the existing merge command in the interactive rebase, that also supports -c and -C options with similar meanings.

Also, fixup -C is intended to support amend! commit upon --autosquash and it's working will be added in another patch series with the implementation of amend! commit.

Changes from v4 :
(Thanks to Eric Sunshine, Christian Couder and Phillip Wood for suggestions
and reviews)

The major change in this version is to remove the working of fixup -C with amend! commit and will include in the another patch series, in order to avoid the confusion. So there are following changes :
* removed the patch (rebase -i : teach --autosquash to work with amend!)
* updated the test script (t3437-*.sh), changed the test setup and removed two tests.

Earlier every test includes the commit message having subject starting with amend! So, now it includes a setup of different branch for testing fixup with options and also updated all the tests.
Removed the test - "skip fixup -C removes amend! from message" and also "sequence of fixup, fixup -C & squash --signoff works" as I think it would be better to test this also in the branch with amend! commit with different author. (Will add these tests with amend! commit implementation)

* changed the flag type from enum todo_item_flags to unsigned
* Removed amend! conditions from sequencer.c and
* Replaced fixup_-* with fixup-* in lib-rebase.sh
* fixup a small nit in Documentation

Charvi Mendiratta (5):
sequencer: pass todo_item to do_pick_commit()
sequencer: use const variable for commit message comments rebase -i: add fixup [-C | -c] command
t3437: test script for fixup [-C|-c] options in interactive rebase doc/git-rebase: add documentation for fixup [-C|-c] options

Phillip Wood (3):
rebase -i: only write fixup-message when it's needed
sequencer: factor out code to append squash message rebase -i: comment out squash!/fixup! subjects from squash message

 Documentation/git-rebase.txt      |  13 +-
 rebase-interactive.c              |   4 +-
 sequencer.c                       | 270 ++++++++++++++++++++++++++----
 t/lib-rebase.sh                   |   8 +-
 t/t3415-rebase-autosquash.sh      |  30 ++--
 t/t3437-rebase-fixup-options.sh   | 133 +++++++++++++++
 t/t3437/expected-combined-message |  19 +++
 t/t3900-i18n-commit.sh            |   4 -
 8 files changed, 425 insertions(+), 56 deletions(-)
 create mode 100755 t/t3437-rebase-fixup-options.sh
 create mode 100644 t/t3437/expected-combined-message

--
2.29.0.rc1