public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Mark Brown <broonie@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, Vlastimil Babka <vbabka@suse.cz>,
	 Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
	Jakub Kicinski <kuba@kernel.org>,
	 "Rafael J. Wysocki" <rafael@kernel.org>,
	dan.j.williams@intel.com,
	 Caleb Sander Mateos <csander@purestorage.com>,
	io-uring <io-uring@vger.kernel.org>,
	 workflows@vger.kernel.org
Subject: Re: Link trailers revisited (was Re: [GIT PULL] io_uring fix for 6.17-rc5)
Date: Tue, 9 Sep 2025 10:50:20 -0700	[thread overview]
Message-ID: <CAHk-=wiN+8EUoik4UeAJ-HPSU7hczQP+8+_uP3vtAy_=YfJ9PQ@mail.gmail.com> (raw)
In-Reply-To: <af29e72b-ade6-4549-b264-af31a3128cf1@sirena.org.uk>

On Tue, 9 Sept 2025 at 10:08, Mark Brown <broonie@kernel.org> wrote:
>
> That works great for pull requests, but it's not so useful for a random
> patch like 5f9efb6b7667043527d377421af2070cc0aa2ecd

Sure it is.

The one-liner is just different. Use the patch-id instead. See Dan's
email - and the whole long discussion about how lore *ALREADY* has
most of this support.

Yeah, the patch-id command is admittedly a bit more esoteric than just
looking up the merge parent commit.

Using "git rev-parse" is already a bit obscure (although honestly,
it's a really useful command, and I actually do use it somewhat
regularly from the command line).

Using "git patch-id" is definitely in the "write a script for it"
category. I don't think I've ever used it as-is from the command line
as part of a one-liner. It's very much a command that is designed
purely for scripting, the interface is just odd and baroque and
doesn't really make sense for one-liners.

The typical use of patch-id is to generate two *lists* of patch-ids,
then sort them and use the patch-id as a key to find commits that look
the same.

That hopefully explains why the patch-id behavior is so odd, and not
really suited for using directly on the command line.

But my point is that we really have the infrastructure already in
place, and it's better than hardcoding some broken link into commits.

Now, I don't have that commit you mention (I assume it's some recent
commit in your own tree), but I picked a random commit from my
top-of-tree that contains one of those useless links, and look here:

   patchid=$(git diff-tree -p fef7ded169ed7e133612f90a032dc2af1ce19bef
| git patch-id | cut -d' ' -f1)
   firefox http://lore.kernel.org/all/?q=patchid:$patchid

and it's right there. It finds the stable tree backport too, and if
there had been multiple versions of the same patch posted, it would
have found the history of it all too.

Look, I readily admit that I would never write that as a one-liner. In
fact, I got it wrong the first time - I don't use 'cut' often enough,
and I forgot that the default delimeter is 'tab', not space, and got
garbage.

So that 'patch-id' generation line is just crazy line noise. I'm *not*
suggesting you do that.

But this kind of thing is literally what I'm talking about when I say
"maybe we could add a few scripts to support what you are doing".

                 Linus

  reply	other threads:[~2025-09-09 17:50 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 11:18 [GIT PULL] io_uring fix for 6.17-rc5 Jens Axboe
2025-09-05 17:24 ` Linus Torvalds
2025-09-05 17:45   ` Konstantin Ryabitsev
2025-09-05 18:06     ` Linus Torvalds
2025-09-05 19:33       ` Link trailers revisited (was Re: [GIT PULL] io_uring fix for 6.17-rc5) Konstantin Ryabitsev
2025-09-05 20:09         ` Linus Torvalds
2025-09-05 20:47         ` Sasha Levin
2025-09-06 11:27         ` Greg KH
2025-09-06 11:27           ` Greg KH
2025-09-06 11:30             ` Greg KH
2025-09-06 13:51           ` Konstantin Ryabitsev
2025-09-06 15:31             ` Linus Torvalds
2025-09-06 18:50               ` Konstantin Ryabitsev
2025-09-06 19:19                 ` Linus Torvalds
2025-09-08  9:11                   ` Jani Nikula
2025-09-08 11:59                 ` Mark Brown
2025-09-08 20:11         ` dan.j.williams
2025-09-09 11:29           ` Mark Brown
2025-09-09 13:17           ` Rafael J. Wysocki
2025-09-09 14:18             ` Jakub Kicinski
2025-09-09 14:35               ` Jens Axboe
2025-09-09 14:42                 ` Konstantin Ryabitsev
2025-09-09 14:48                   ` Vlastimil Babka
2025-09-09 14:50                     ` Jens Axboe
2025-09-09 15:30                       ` Rafael J. Wysocki
2025-09-09 16:40                       ` Linus Torvalds
2025-09-09 17:08                         ` Mark Brown
2025-09-09 17:50                           ` Linus Torvalds [this message]
2025-09-09 17:58                             ` Linus Torvalds
2025-09-09 18:31                               ` Konstantin Ryabitsev
2025-09-09 19:36                                 ` dan.j.williams
2025-09-10  1:12                                 ` dan.j.williams
2025-09-10 12:19                                   ` Mark Brown
2025-09-09 17:25                         ` dan.j.williams
2025-09-09 17:56                           ` Alexei Starovoitov
2025-09-09 18:01                             ` Linus Torvalds
2025-09-09 18:13                               ` Alexei Starovoitov
2025-09-09 18:06                         ` Vlastimil Babka
2025-09-09 18:14                           ` Linus Torvalds
2025-09-09 18:22                             ` Vlastimil Babka
2025-09-09 21:05                               ` Mark Brown
2025-09-10  1:33                                 ` Konstantin Ryabitsev
2025-09-09 14:44                 ` Greg KH
2025-09-09 15:14                 ` Danilo Krummrich
2025-09-09 16:32         ` [RFC] b4 dig: Add AI-powered email relationship discovery command Sasha Levin
2025-09-09 17:22           ` Laurent Pinchart
2025-09-09 17:26             ` Jens Axboe
2025-09-09 18:54               ` Sasha Levin
2025-09-10 10:13                 ` Laurent Pinchart
2025-09-10 10:55                   ` Sasha Levin
2025-09-10 11:29                     ` Laurent Pinchart
2025-09-10 13:38             ` Konstantin Ryabitsev
2025-09-10 14:03               ` Andrew Dona-Couch
2025-09-11 14:48           ` Nicolas Frattaroli
2025-09-11 15:05             ` Sasha Levin
2025-09-11 19:13               ` Nicolas Frattaroli
2025-09-11 19:57                 ` Sasha Levin
2025-09-15 11:26                   ` Mark Brown
2025-09-15 11:48                     ` Sasha Levin
2025-09-15 12:03                       ` Mark Brown
2025-09-11 23:24           ` Konstantin Ryabitsev
2025-09-07 22:04     ` [GIT PULL] io_uring fix for 6.17-rc5 Jonathan Corbet
2025-09-05 19:04   ` Jens Axboe
2025-09-05 19:07     ` Jens Axboe
2025-09-05 19:13     ` Caleb Sander Mateos
2025-09-05 19:16       ` Jens Axboe
2025-09-05 19:15     ` Linus Torvalds
2025-09-05 19:23       ` Jens Axboe
2025-09-05 19:21     ` Linus Torvalds
2025-09-05 19:30       ` Jens Axboe
2025-09-05 20:54         ` Linus Torvalds
2025-09-06  0:01           ` Jens Axboe
2025-09-07 18:47             ` Jonathan Corbet
2025-09-08 22:15             ` Alexei Starovoitov

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='CAHk-=wiN+8EUoik4UeAJ-HPSU7hczQP+8+_uP3vtAy_=YfJ9PQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=broonie@kernel.org \
    --cc=csander@purestorage.com \
    --cc=dan.j.williams@intel.com \
    --cc=io-uring@vger.kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=kuba@kernel.org \
    --cc=rafael@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=workflows@vger.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