Skip to content

improve "git format-patch --commit-list-format"

Mirko Faina git 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 10 repliesIn review
  2. v28 patches 2 repliesSuperseded
  3. v17 patches 4 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8pretty.c: better die message %(count) and %(total)pretty.c+2 -20 replies
2/8format-patch: refactor generate_commit_list_coverbuiltin/log.c+3 -40 replies
3/8format-patch: rename --cover-letter-format optionDocumentation/git-format-patch.adoc builtin/log.c t/t4014-format-patch.sh +1 more+32 -310 replies
4/8docs/pretty-formats: add %(count) and %(total)Documentation/pretty-formats.adoc+4 -00 replies
5/8format.commitListFormat: strip meaning from emptybuiltin/log.c t/t4014-format-patch.sh+1 -210 replies
6/8format-patch: wrap generate_commit_list_cover()builtin/log.c+7 -10 replies
7/8format-patch: add preset for --commit-list-formatDocumentation/config/format.adoc Documentation/git-format-patch.adoc builtin/log.c +1 more+21 -80 replies
8/8format-patch: --commit-list-format without prefixDocumentation/git-format-patch.adoc builtin/log.c t/t4014-format-patch.sh+29 -10 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/8] improve "git format-patch --commit-list-format"

Not much has changed, just applied the suggestions Kristoffer made. Thank you again for the review

[1/8] pretty.c: better die message %(count) and %(total) (Mirko Faina) [2/8] format-patch: refactor generate_commit_list_cover (Mirko Faina) [3/8] format-patch: rename --cover-letter-format option (Mirko Faina) [4/8] docs/pretty-formats: add %(count) and %(total) (Mirko Faina) [5/8] format.commitListFormat: strip meaning from empty (Mirko Faina) [6/8] format-patch: wrap generate_commit_list_cover() (Mirko Faina) [7/8] format-patch: add preset for --commit-list-format (Mirko Faina) [8/8] format-patch: --commit-list-format without prefix (Mirko Faina)

 Documentation/config/format.adoc    |  2 +-
 Documentation/git-format-patch.adoc | 19 ++++----
 Documentation/pretty-formats.adoc   |  4 ++
 builtin/log.c                       | 35 +++++++-------
 pretty.c                            |  4 +-
 t/t4014-format-patch.sh             | 72 +++++++++++++++++++----------
 t/t9902-completion.sh               |  1 -
 7 files changed, 84 insertions(+), 53 deletions(-)

Range-diff against v2:

1:  a0d26c5999 = 1:  a0d26c5999 pretty.c: better die message %(count) and %(total)
2:  883dd358b6 = 2:  883dd358b6 format-patch: refactor generate_commit_list_cover
3:  5d061d6398 = 3:  5d061d6398 format-patch: rename --cover-letter-format option
4:  7b1e5cbb24 ! 4:  ce7d1bd1fe docs/pretty-formats: add %(count) and %(total)

@@ Metadata
## Commit message ##
docs/pretty-formats: add %(count) and %(total)

- When --commit-list-format has been introduced to format-patch, two new
- placeholders have been added to the PRETTY FORMATS code without being
+ When --commit-list-format was introduced to format-patch, two new
+ placeholders were added to the PRETTY FORMATS code without being
documented. Do so now.

@@ Documentation/pretty-formats.adoc: The placeholders are:
+%D+:: ref names without the " (", ")" wrapping.
++%(count)+:: the number of a patch within a patch series. Used only in
+ --commit-list-format in format-patch
-++%(total)+:: the number of tatal patches in a patch series. Used only in +++%(total)+:: the total number of patches in a patch series. Used only in
+ --commit-list-format in format-patch
++%(decorate++[:<option>,...]++)++::
ref names with custom decorations. The decorate string may be followed by a
5: 3cb0a0a088 ! 5: 66d30249bb format.commitListFormat: strip meaning from empty
@@ Commit message

The configuration variable format.commitListFormat allows for an empty value. This is unusual and can create issues when interacting with this
- configuration variable through the cli interface.
+ configuration variable through the CLI.

Strip meaning to format.commitListFormat with an empty value.

6:  3f547451a2 = 6:  c722fc9d0f format-patch: wrap generate_commit_list_cover()
7:  fdcb68e650 = 7:  bdd8f1fb57 format-patch: add preset for --commit-list-format
8:  ef0d3ed876 = 8:  d125458e33 format-patch: --commit-list-format without prefix
Signature · 1 line
2.53.0.1118.gaef5881109