git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Pat Notz <patnotz@gmail.com>
Date
Nov 2, 2010, 19:59 UTC
Message-ID
<1288727952-57498-1-git-send-email-patnotz@gmail.com>

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
-- 
1.7.3.2
Next: Pat Notz
Message 1 of 9 in “[PATCHv7 0/6] Add commit message options for rebase --autosquash”
  1. Pat NotzNov 2, 2010
  2. 1/6 commit: helper methods to reduce redundant blocks of codePat Notz, Nov 2, 2010
  3. Thiago FarinaNov 2, 2010
  4. 2/6 pretty.c: teach format_commit_message() to reencode the outputPat Notz, Nov 2, 2010
  5. 3/6 commit: --fixup option for use with rebase --autosquashPat Notz, Nov 2, 2010
  6. 4/6 add tests of commit --fixupPat Notz, Nov 2, 2010
  7. 5/6 commit: --squash option for use with rebase --autosquashPat Notz, Nov 2, 2010
  8. Stephen BoydNov 3, 2010
  9. 6/6 add tests of commit --squashPat Notz, Nov 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.