From: Sasha Levin <sashal@kernel.org>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: users@kernel.org, tools@kernel.org
Subject: Re: [b4] initial "b4 dig" to supplant Link: trailers
Date: Tue, 14 Oct 2025 17:49:31 -0400 [thread overview]
Message-ID: <aO7FayHzTEKVsWAt@laps> (raw)
In-Reply-To: <20251014-gorgeous-cougar-of-endeavor-0c5baa@lemur>
On Tue, Oct 14, 2025 at 05:17:43PM -0400, Konstantin Ryabitsev wrote:
>On Fri, Oct 10, 2025 at 04:47:27PM -0400, Konstantin Ryabitsev wrote:
>
>Seems working on this right before disappearing for the long weekend due to
>Canadian Thanksgiving was not the best choice. :)
>
>I've carefully read everyone's feedback, and made significant changes to how
>"b4 dig" operates. Specifically:
>
>"b4 dig -c [commitish]" will now output a single link to stdout (all other
>output going to stderr), so that it can be piped to other commands. It should
>be the latest matching patch received by lore prior and including the "author
>date" of the commit. This weeds out all ensuing backports and cherry-picking
>efforts.
Nice!
I've tested it a bit and ended up with a few suggestions :)
1. If the provided commit actually has a Link: trailer, we should just use
that(?).
2. Some maintainers re-send patches they've accepted. An example:
$ ~/b4/b4.sh dig -c 54b91e54b113d4f15ab023a44f508251db6e22e7
Digging into commit 54b91e54b113d4f15ab023a44f508251db6e22e7
Attempting to match by exact patch-id...
Trying to find matching series by patch-id 340e7baae92a71dd5e62a4e8a52245348ff3a0a1 (myers)
Found matching series by patch-id
Will consider promising messages: 2
---
[for-linus][PATCH v2 2/2] tracing: Stop fortify-string from warning in tracing_mark_raw_write()
https://lore.kernel.org/r/20251011194257.341582199@kernel.org
Which doesn't end up pointing to the actual submission. I'm not really sure
whats the "correct" way of addressing this...
3. Date filtering seems to be broken:
$ ~/b4/b4.sh dig -c 41b1f9fcba62b06195e625bb88c1031102892439
Digging into commit 41b1f9fcba62b06195e625bb88c1031102892439
Attempting to match by exact patch-id...
Trying to find matching series by patch-id 3f5f81f85a73d73ff83e8c0cb9a4fe81d5ba4619 (myers)
Grabbing search results from lore.kernel.org
Nothing matching that query.
Attempting to match by author and subject...
Grabbing search results from lore.kernel.org
Nothing matching that query.
Could not find anything matching commit 41b1f9fcba62b06195e625bb88c1031102892439
It doesn't look like lore takes a range in the form of rt:..{date}. We probably need something like:
--- a/src/b4/dig.py
+++ b/src/b4/dig.py
@@ -138,7 +138,7 @@ def dig_commitish(cmdargs: argparse.Namespace) -> None:
logger.info('Trying to find matching series by patch-id %s (%s)', patch_id, algo)
# Limit lookup by date prior to the commit date, to weed out any false-positives from
# backports or from erroneously resent series
- extra_query = f'AND rt:..{cdate}'
+ extra_query = f'rt:{cdate}'
logger.debug('extra_query=%s', extra_query)
msgs = b4.get_msgs_by_patch_id(patch_id, nocache=cmdargs.nocache, extra_query=extra_query)
if msgs:
At which point:
$ ~/b4/b4.sh dig -c 41b1f9fcba62b06195e625bb88c1031102892439
Digging into commit 41b1f9fcba62b06195e625bb88c1031102892439
Attempting to match by exact patch-id...
Trying to find matching series by patch-id 3f5f81f85a73d73ff83e8c0cb9a4fe81d5ba4619 (myers)
Grabbing search results from lore.kernel.org
Found matching series by patch-id
Will consider promising messages: 1
Grabbing thread from lore.kernel.org/all/20250901215241.14667-1-mwen@igalia.com/t.mbox.gz
---
[PATCH] drm/amd/display: remove output_tf_change flag
https://lore.kernel.org/r/20250901215241.14667-1-mwen@igalia.com
--
Thanks,
Sasha
next prev parent reply other threads:[~2025-10-14 21:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 20:47 [b4] initial "b4 dig" to supplant Link: trailers Konstantin Ryabitsev
2025-10-11 12:39 ` Greg KH
2025-10-13 8:13 ` Peter Zijlstra
2025-10-11 20:08 ` Geert Uytterhoeven
2025-10-11 22:46 ` Linus Torvalds
2025-10-11 23:38 ` Sasha Levin
2025-10-11 23:44 ` Linus Torvalds
2025-10-12 0:39 ` Sasha Levin
2025-10-12 23:17 ` Jason Gunthorpe
2025-10-13 17:12 ` Mark Brown
2025-10-13 17:36 ` Linus Torvalds
2025-10-14 21:17 ` Konstantin Ryabitsev
2025-10-14 21:49 ` Sasha Levin [this message]
2025-10-15 13:47 ` Konstantin Ryabitsev
2025-10-14 22:13 ` Mark Brown
2025-10-15 13:44 ` Konstantin Ryabitsev
2025-10-15 13:52 ` Mark Brown
2025-10-15 16:40 ` Rob Herring
2025-10-15 2:52 ` Martin K. Petersen
2025-10-15 13:43 ` Konstantin Ryabitsev
2025-10-15 17:37 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aO7FayHzTEKVsWAt@laps \
--to=sashal@kernel.org \
--cc=konstantin@linuxfoundation.org \
--cc=tools@kernel.org \
--cc=users@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).