Age | Commit message (Collapse) | Author |
|
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>
|
|
b4 shazam will now:
1. give you a better default message for merging FETCH_HEAD
2. reuse the conver letter for the merge message, giving you the example
invocation for using it
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Setting b4.git-am-flags should allow you to specify what additional
flags to pass to "git am" before shazaming a bunch of patches on to the
current branch. Example entry in ~/.gitconfig
[b4]
git-am-flags = -s
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
After the shazam refactoring, the thank-you recording went missing from
both the "b4 shazam -A" and "b4 am" workflows. Restore the calls.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Looks like we don't need to have the files in place to run "git am", so
skip that step and just init the sparsest possible tree.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
By popular demand, provide a way to apply series straight to a git
repository. By default, we're still going the safest possible route:
- create a sparse worktree consisting just of the files being modified
- run "git am" against the temporary worktree
- if "git am" went well, fetch from the temporary worktree into our
current tree and leave everything in FETCH_HEAD
- unless we're running "b4 shazam -A" in which case we just apply to the
current HEAD (exact equivalent of b4 am -o- | git am)
Further changes to come based on feedback.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
New version of lore.kernel.org is live today, so release the version of
b4 that works best with it.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
When generating am-ready patch series, separate each standard body part
with a single pair of newlines regardless of how many the original
message contained.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
When we query /all/, we often get duplicates if a message was
crossposted to multiple lists and some of those lists altered the
message subject/body (e.g. legacy mailman, groups.io, etc). The
listid-preference parameter allows us to dedupe based on lists that are
least likely to mangle the messages.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
We no longer support backfilling (obsolete), so remove it from all
places where it's used.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Extindex allows us to get rid of a couple of kludges:
- we no longer need to manually backfill, as /all/ contains all sources
- we can just query /all/ for new series
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
When querying against /all/, we may get multiple hits for the same
subject, so deal with it early.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
We want to dedupe all threads we retrieve from public-inbox, so do this
in the central place instead of only when doing get_strict_tread().
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Instead of relying on DKIM validation, use list-id preference when
dealing with multiple messages matching the same message-id. We may
end up adding an attestation check to it as well in the future.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
With newer lore.kernel.org and /all/, we get duplicate messages when
message bodies are different due to one of the messages passing through
a DKIM-compliant list, and another one through something that injects
in-body or in-subject junk. When dealing with duplicates, check both for
DKIM status and prefer the message that actually passes DKIM validation.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Sometimes the encoding indicated in the header lies and it's not actualy
that codepage at all. When that happens, just replace errors and
continue.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
When the mbox and am subcommands grab a message ID from the mbox
on stdin, they call message_from_bytes(), which in turn calls
BytesParser().parsebytes(s).
parsebytes() has a headersonly parameter that can be used to tell it
to stop parsing after reading the headers. The headers are all that's
needed here, so use BytesParser directly and set headersonly.
Signed-off-by: Kyle Meyer <kyle@kyleam.com>
Link: https://lore.kernel.org/tools/20210717164836-mutt-send-email-mst@kernel.org/
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
The mbox, am, and pr subcommands accept an mbox on stdin and extract
the message ID. When stdin.read() is called, Python assumes the
encoding is locale.getpreferredencoding(False). This may not match
the content encoding, leading to a decoding error.
Instead feed the stdin bytes to message_from_bytes(), which leads to a
decode('ASCII', errors='surrogateescape') underneath. That's
sufficient to get the message ID from the ASCII headers.
Reported-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Kyle Meyer <kyle@kyleam.com>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Drop anything in the body below "-- " before parsing the contents for
trailers. This won't catch all possible situations, as the "-- "
standard is a bit of a dying standard, so add a list of known baddies
like "Phone:" and "Email:" that are likely to trip us up.
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/tools/20210719213535.vw3u4yg5mgxqysaf@pengutronix.de/
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Before using the msgid as part of the filename, clean it up to only
contains sensible characters.
Reported-by: Rob Herring <robherring2@gmail.com>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Some patches don't have index information, so don't say they "apply
clean to current tree" when they don't.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
With multiple git worktrees, '.git' can be a file pointing to the real
'.git' directory, so the current check for a directory is too strict.
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210621204335.1627303-1-robh@kernel.org
|
|
Run the check against current tree even if no --guess-base is specified
(it's cheap).
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Use --all by default, instead of limiting ourselves just to the current
HEAD. This is actually a faster operation, because we don't have to
pre-filter results.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|