trailers: add -e flag to apply extra trailers from file
Add support for the -e/--extra-trailers flag to the 'b4 trailers'
command, matching the functionality already present in 'b4 am' and
'b4 shazam'.
This allows users to apply additional trailers from a file to all
patches in a series, which is useful for automated workflows such
as adding CI test results or automated review tags.
Usage:
b4 trailers -u -e extra-trailers.txt
The file should contain trailers in standard Git format:
Tested-by: CI Bot <ci@example.org>
Reviewed-by: Auto Reviewer <auto@example.org>
The implementation:
- Reads and parses the extra trailers file
- Applies trailers to all commits with diffs in the series
- Handles file not found and IO errors gracefully
- Integrates with existing trailer processing logic
3 files changed