Age | Commit message (Collapse) | Author |
|
Fix a logic bug that prevented the To: header from being added on
--dry-run and do a better job making sure the addresses are valid and
sane.
Reported-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
After we sent off the revision, create the structure in the tree that
would allow us to go back to that revision regardless of what changes we
make to the working branch. This is tricky for the default "commit"
strategy, because we want to remove the cover letter from the history
and store its final version in the tag applied to the tip commit.
For this, we create a detached head, cherry-pick the range without the
cover, and then tag the resulting detached head.
Future work will make it possible to prep and send these as pull
requests.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
I need to refactor the entire approach to trailers so we stop passing
around tuples. It made sense at the time, but now it's just a source of
bugs.
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
We currently only support "commit" and "branch-description" strategies.
Two more may be implemented in the future, but I need to figure out if
commit reordering can be done with git-filter-repo or not.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
When writing out message in format-patch compatibility mode, do not wrap
headers, otherwise checkpatch or git-send-email may complain.
Reported-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Just in case something got screwed up, give folks an overview of what
will be sent and ability to bail out before sending things off.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
If one of the previxes is RESEND, then we don't auto-increment revision.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Show current revision with --show-revision and allow setting it to an
arbitrary integer using --force-revision.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
We were wrongly triggering trailer updates when there were, in fact, no
outstanding trailer updates to apply.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Significant refactor of (formerly) "b4 submit" based on initial
feedback:
1. Split "b4 submit" into three different commands:
- ez-series: for managing the series cover letters, tracking info, etc
- ez-trailers: for retrieving trailers and updating commits (works on
any branch, not just ez-series branches)
- ez-send: for sending branches managed by ez-series
2. Refactor to support multiple cover letter strategies:
- the default "commit" strategy that keeps the cover letter in an
empty commit (should be backwards-compatible with "b4 submit")
- the non-invasive "branch-description" strategy that keeps the cover
letter in the branch.branchname.description configuration setting and
tracking in branch.branchname.b4-tracking
- the not-yet-implemented "tag" strategy that mimics the behaviour of
git-publish
The strategy can be set via b4.ez-cover-strategy variable, e.g. in
your .gitconfig:
[b4]
ez-cover-strategy = branch-description
Note, that converting from one strategy to another doesn't work and
will probably explode in weird ways right now.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Reduce the size of the X-b4-tracking header by gzip-compressing the json
output before base64-ing it.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
git-rev-list returns patches in reverse chronological order by default,
which is the opposite of what we need. Add a --reverse to the call to
get the expected behaviour.
Reported-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/tools/87ilnti947.fsf@baylibre.com/
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Stick tracking info into the special header of the cover letter, which
should allow us to fully recreate the branch from lore.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
We weren't quite doing the right thing when --update-trailers was used
with --signoff, so this should fix the behaviour and the output.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
When using set_payload(), we should pass along the charset as well,
otherwise we run into trouble when converting to/from bytes again.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
This is the first rough implementation of "b4 submit". Currently
implemented:
- b4 submit --new : to start a new branch
- b4 submit --edit-cover : to edit the cover message
- b4 submit --update-trailers : to receive latest trailer updates from
the mailing lists
- b4 submit --send : sends the messages using existing git.sendemail
configs
For details, see "b4 submit --help".
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
The trailer *names* should always be ascii. While it is possible to
imagine that some project would have non-ascii trailer names like:
Signalé-par: Developpeur Un <d1@example.com>
Co-développé-avec: Developpeur Deux <d2@example.com>
Nonetheless, I am not aware of any project doing this, and this allows
us to weed out a bunch of false-positives from bad forwards.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Chain-of-custody order requires that Signed-off-by closes the list of
added trailers.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Per discussion on the mailing lists, reordering trailers is almost never
the right decision, so remove support for trailer ordering completely.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
We've deprecated "b4 attest" two versions ago, so remove it completely
now. Everyone should use "patatt attest" instead.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
We don't want to use the set() here, since we want to preserve the
order, so use an auxiliary set for dupe tracking.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Yes, I debug with print().
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
A lot of maintainers use patchwork alongside b4, to make it easier to
track patches and rely on some CI integration. This commit adds some
basic patchwork integration:
- on "b4 am", "b4 shazam", "b4 pr" we will mark the relevant patchwork
entries as "Under Review"
- on "b4 ty" we can set these patches as "Accepted"
- on "b4 ty -d" we can set them as "Deferred"
To make it work, the following entries must be present in the repository
used with b4:
[b4]
pw-key = (your API token)
pw-url = https://patchwork.kernel.org
pw-project = (your project, e.g. linux-usb)
pw-review-state = under-review
pw-accept-state = accepted
pw-discard-state = deferred
To get your patchwork API token, go to your patchwork profile page.
The pw-accept-state and pw-discard-state can be overridden using the
--pw-set-state flag to "b4 ty". E.g. if you wanted to mark the patches
as "Not applicable":
b4 ty -d 5 --pw-set-state not-applicable
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
It is time to roll out 0.9.0 for wider use. Update requirements to the
latest supported and tested versions.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
We've been using patch attestation for over a year now, so remove the
EXPERIMENTAL claim -- it's no more experimental by this point than the
rest of b4.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Patatt-0.5.0 is out, so update our submodule info.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
It may be useful for the maintainer to review b4 retrieval/validation
output before git-merge is invoked, so add a pause requiring an Enter or
Ctrl-C.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
In addition to just being able to fetch a series into FETCH_HEAD, also
add an option to exec git-merge automatically so that people don't have
to cut-and-paste the merge command to use with paths to the cover
letter.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Proxying requests is possible via the HTTPS_PROXY env variable, so make
a note of that in the manpage.
Suggested-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/tools/20220218153128.914071-1-void@manifault.com
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
It is a common request to be able to get a partial thread in case
someone submitted an auxiliary standalone patch in the middle of a
larger patch series. Passing the msgid of the start of the thread along
with --no-parent should tell b4 to break the thread at the start of the
message-id specified and only consider that message and its children.
Suggested-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/tools/YpTI9lhCfA7shi6j@sirena.org.uk/
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Minor nitpicking by PyCharm, but not completely unreasonable.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Sometimes the DKIM record will have the full email address instead of
just the @domainname.com part. For those cases, drop the local part so
we don't falsely claim domain mismatching during b4-am runs.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
When performing attestor identity comparisons, lowercase email addresses
and domain names for case-insensitive matching.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
b4's usage of git-log '--branches' option is broken. The option takes a
glob pattern *only* and must have an '=', but b4 ends up passing
'--branches <guessbranch>' to git-log. This will kind of work, but is
not checking only 'guessbranch'. For example, these 3 commands all do
something different:
git log -1 --branches=master
git log -1 --branches master
git log -1 --branches=*aster
A maintainer wanting to apply a patch or series likely has a small set of
known branches they apply patches to. Using a glob pattern is not a good
fit for that. Instead, allow --guess-branch to be repeated and to take
fixed refs.
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220331195346.1384515-1-robh@kernel.org
|
|
On lore.kernel.org we provide a unified index of all mailing lists in
/all/, which removes the need to perform a redirect lookup when querying
by message-id. However, some public-inbox instances may not have that,
so we still need to be able to fall back to that redirect lookup. Adapt
a patch from Rob Herring to support both situations.
Link: https://lore.kernel.org/tools/20220225031135.4136158-1-robh@kernel.org/
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
This will soon become patatt-0.5.0, so start using it in our daily
tests.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
With codeaurora.org accounts no longer accepting mail, add support to
exclude addresses when generating b4-ty mail. Additionally, support
mailmap replacements by running every address through
"git check-mailmap".
Requested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Sometimes folks indent their trailers with whitespace, so relax the
rules to recognize this situation. In theory, this shouldn't introduce
false-positives.
Suggested-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20211214214327.4003631-1-robh@kernel.org
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Instead of hardcoding the logic to bail at all presence of control
characters, soften it a bit to only error out when we see the presence
of Cfs in the absence of any other character from a non-latin character
set in the same line.
Additionally, show exactly where the Cfs were found when printing out
the error message.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Implement initial support for checking if the patch message contains
unicode control characters that can be used to trick code reviewer into
accepting maliciously formatted code.
Link: https://lore.kernel.org/tools/20211101175020.5r4cwmy4qppi7dis@meerkat.local/
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
There appears to be a bug in smtplib that doesn't properly support 8-bit
content even when upstream SMTP gateway supports 8BITMIME (they all do,
it's not 90s any more). Work around this by passing the message payload
as bytes instead of string.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Test out and fix the bugs introduced by switching flags.
Reported-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
We've replaced "b4 ty -s" with "b4 ty -t" to better disambiguate it from
"b4 -S" which does the actual mail sending. This commit documents this
change, plus adds -S,--send-email and --dry-run flags.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Based on the feedback, change the default behaviour of "b4 shazam" to
apply patches to the current tree instead of doing FETCH_HEAD magic.
This is still available when used with -H,--make-fetch-head flag.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
I'm felling comfortable that "b4 ty" is sufficiently mature at this
point to implement sending thank-yous directly. This is only the initial
implementation that covers only the very basic parts of git's sendemail
configuration options, but this should actually cover 90% of cases if
not more.
One important caveat -- I moved the "b4 ty -s" flag to be "b4 ty -t" in
order to disambiguate it from the capital -S (that actually does the
sending). Since "b4 ty" is still marked as an experimental feature, I
feel we can do this without much impact.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
The shazam command makes assumptions that '.git' is a directory which is
not the case with multiple worktree. Use 'git rev-parse' instead to
retrieve the correct paths.
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211019144600.225058-1-robh@kernel.org
|
|
If b4 doesn't have an explicit keyringsrc configured, attempt to fetch
it from patatt configuration instead. This avoids some very confusing
situations where patatt would validate and b4 would reject. (I had an
expired pubkey in my gpg default keyring, but the same pubkey had an
updated expiration date in patatt's keyring.)
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211007165551.2312946-1-keescook@chromium.org
|
|
Add Keys Cook's key to the repo keyring, since he's sending lots of
patches lately.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
The flags and functionality of shazam may still change, so not
documenting the rest of the usage yet.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Allow people to set up their own preferred merge templates, using the
netdev standard as default.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|