patman: Add a tag for when a patch gets added to a series

When a patch is added to a series after the initial version, there are no
changes to note except that it is new. This is typically done to suppress
the "(no changes in vN)" message. It's also nice to add a change to the
cover letter so reviewers know there is an additional patch. Add a tag to
automate this process a bit.

There are two nits with the current approach:

- It favors '-' as a bullet point, but some people may prefer '*' (or
  something else)
- Tags (e.g. 'patman: ' in 'patman: foo bar') are not stripped. They are
  probably just noise in most series, but they may be useful for treewide
  series to distinguish 'gpio: frobnicate' from 'reset: frobnicate', so
  I've left them in.

Suggestions for the above appreciated.

Suggested-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
This commit is contained in:
Sean Anderson
2024-04-18 22:36:32 -04:00
committed by Simon Glass
parent b4f73931ed
commit 18de1afd48
5 changed files with 22 additions and 0 deletions

View File

@@ -293,6 +293,7 @@ Changes in v4:
change change
- Some changes - Some changes
- Some notes for the cover letter - Some notes for the cover letter
- fdt: Correct cast for sandbox in fdtdec_setup_mem_size_base()
Simon Glass (2): Simon Glass (2):
pci: Correct cast for sandbox pci: Correct cast for sandbox
@@ -342,6 +343,7 @@ Changes in v4:
- Multi - Multi
line line
change change
- New
- Some changes - Some changes
Changes in v2: Changes in v2:

View File

@@ -477,6 +477,11 @@ class PatchStream:
self.change_version = self._parse_version(value, line) self.change_version = self._parse_version(value, line)
elif name == 'cc': elif name == 'cc':
self.commit.add_cc(value.split(',')) self.commit.add_cc(value.split(','))
elif name == 'added-in':
version = self._parse_version(value, line)
self.commit.add_change(version, '- New')
self.series.AddChange(version, None, '- %s' %
self.commit.subject)
else: else:
self._add_warn('Line %d: Ignoring Commit-%s' % self._add_warn('Line %d: Ignoring Commit-%s' %
(self.linenum, name)) (self.linenum, name))

View File

@@ -350,6 +350,19 @@ Cover-changes: n
- This line will only appear in the cover letter - This line will only appear in the cover letter
<blank line> <blank line>
Commit-added-in: n
Add a change noting the version this commit was added in. This is
equivalent to::
Commit-changes: n
- New
Cover-changes: n
- <commit subject>
It is a convenient shorthand for suppressing the '(no changes in vN)'
message.
Patch-cc / Commit-cc: Their Name <email> Patch-cc / Commit-cc: Their Name <email>
This copies a single patch to another email address. Note that the This copies a single patch to another email address. Note that the
Cc: used by git send-email is ignored by patman, but will be Cc: used by git send-email is ignored by patman, but will be

View File

@@ -23,6 +23,7 @@ Series-version: 3
Patch-cc: fred Patch-cc: fred
Commit-cc: joe Commit-cc: joe
Series-process-log: sort, uniq Series-process-log: sort, uniq
Commit-added-in: 4
Series-changes: 4 Series-changes: 4
- Some changes - Some changes
- Multi - Multi

View File

@@ -51,6 +51,7 @@ Date: Sat Apr 15 15:39:08 2017 -0600
Patch-cc: fred Patch-cc: fred
Commit-cc: joe Commit-cc: joe
Series-process-log: sort, uniq Series-process-log: sort, uniq
Commit-added-in: 4
Series-changes: 4 Series-changes: 4
- Some changes - Some changes
- Multi - Multi