Skip to content

Add commit message options for rebase --autosquash

Pat Notz git 7 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest6 patches 2 repliesIn review
  2. v66 patches 4 repliesSuperseded
  3. v58 patches 8 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v44 patches4 repliesSuperseded
v34 patches3 repliesSuperseded
v24 patches7 repliesSuperseded
v12 patches6 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6commit: helper methods to reduce redundant blocks of codebuiltin/commit.c builtin/log.c builtin/mailinfo.c +5 more+36 -321 reply
2/6pretty.c: teach format_commit_message() to reencode the outputcommit.h pretty.c+24 -60 replies
3/6commit: --fixup option for use with rebase --autosquashDocumentation/git-commit.txt builtin/commit.c+28 -80 replies
4/6add tests of commit --fixupt/t3415-rebase-autosquash.sh t/t3900-i18n-commit.sh t/t7500-commit.sh+83 -20 replies
5/6commit: --squash option for use with rebase --autosquashDocumentation/git-commit.txt builtin/commit.c+41 -31 reply
6/6add tests of commit --squasht/t3415-rebase-autosquash.sh t/t3900-i18n-commit.sh t/t7500-commit.sh +1 more+57 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v7 yet.

Read the v7 thread

Cover letter [PATCHv7 0/6] Add commit message options for rebase --autosquash

This patch series adds new command line options to git-commit to make it easy to specify messages for commits correctly formatted for use with 'rebase -i --autosquash'.

This iteration (v7) addresses criticisms about implementation details raised against the v6 series. For details, see

http://thread.gmane.org/gmane.comp.version-control.git/159547

The first patch introduces minor refactorings that set the stage for subsequent patches, mostly preventing copy-n-paste coding in what follows.

The second patch teaches format_commit_message to reencode the content if the caller's commit object uses an encoding different from the commit encoding.

The remaining patches add the --fixup and --squash commands to git-commit including tests of commit, interactions with rebase and i18n encodings.

One issue which limits the testing (but not the implementation, I think) is that when 'rebase --autosquash' is comparing commit subject lines it does not first make sure that the commits use a common encoding. That's follow-on work.

Pat Notz (6):
commit: helper methods to reduce redundant blocks of code pretty.c: teach format_commit_message() to reencode the output
commit: --fixup option for use with rebase --autosquash add tests of commit --fixup
commit: --squash option for use with rebase --autosquash add tests of commit --squash

 Documentation/git-commit.txt |   21 +++++++++--
 builtin/commit.c             |   81 ++++++++++++++++++++++++++++--------------
 builtin/log.c                |    3 +-
 builtin/mailinfo.c           |    2 +-
 cache.h                      |    3 ++
 commit.c                     |   13 +++++++
 commit.h                     |    4 ++
 environment.c                |   11 ++++++
 pretty.c                     |   36 ++++++++++++-------
 t/t3415-rebase-autosquash.sh |   29 ++++++++++++++-
 t/t3900-i18n-commit.sh       |   29 +++++++++++++++
 t/t7500-commit.sh            |   80 +++++++++++++++++++++++++++++++++++++++++
 t/t7500/edit-content         |    4 ++
 13 files changed, 267 insertions(+), 49 deletions(-)
 create mode 100755 t/t7500/edit-content
Signature · 1 line
1.7.3.2