* RFE: commit git-patch-id lookup links
@ 2022-10-07 17:25 Konstantin Ryabitsev
2022-10-07 21:14 ` Eric Wong
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Ryabitsev @ 2022-10-07 17:25 UTC (permalink / raw)
To: cgit
Hi, all:
One of the recent additions to public-inbox was auto-indexing of patches by
their patch-id (see git-patch-id.1). This allows to see a history of many
commits through public-inbox discussions. Using a random commit as an example:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e4dc45b1848bc6bcac31eb1b4ccdd7f6718b3c86
We can convert it to a patch-id and look up its history:
$ echo "https://lore.kernel.org/all/?q=patchid:$(git show e4dc45b1848 | git patch-id --stable | awk '{print $1}')"
https://lore.kernel.org/all/?q=patchid:d91c951338cfe9f06e8b8aa74856f6dc08ac8212
It would be nice to have this feature in cgit:
1. add "patch-id-query-url" parameter, e.g.:
patch-id-query-url=https://lore.kernel.org/all/?q=patchid:%s
2. when defined, commit views would add another entry in the header table:
<tr>
<th>code-review</th>
<td colspan='2' class='sha1'><a href='https://lore.kernel.org/all/?q=patchid:${patchid}'>patchid:${patchid}</a><br/></td>
</tr>
This would only make sense for non-merge commits (i.e. those with fewer than 2
parents).
Thoughts?
-K
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFE: commit git-patch-id lookup links
2022-10-07 17:25 RFE: commit git-patch-id lookup links Konstantin Ryabitsev
@ 2022-10-07 21:14 ` Eric Wong
0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2022-10-07 21:14 UTC (permalink / raw)
To: Konstantin Ryabitsev; +Cc: cgit
Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> Hi, all:
>
> One of the recent additions to public-inbox was auto-indexing of patches by
> their patch-id (see git-patch-id.1). This allows to see a history of many
> commits through public-inbox discussions. Using a random commit as an example:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e4dc45b1848bc6bcac31eb1b4ccdd7f6718b3c86
>
> We can convert it to a patch-id and look up its history:
>
> $ echo "https://lore.kernel.org/all/?q=patchid:$(git show e4dc45b1848 | git patch-id --stable | awk '{print $1}')"
> https://lore.kernel.org/all/?q=patchid:d91c951338cfe9f06e8b8aa74856f6dc08ac8212
Fwiw, patchid: doesn't account for some cases where non-standard options
are used for generating patches (e.g. -W, -U<n>). Admittedly they're
rare cases...
I've been favoring searches for postimage blob IDs (since pre-patchid
in public-inbox), possibly combined with Subject: phrase matches.
Fwiw, public-inbox can show git commits and prefill search forms:
https://public-inbox.org/git/d1e76d5ddcacdfc76bc247e7594e3fbaaa5ea9cc/s/
the top search form has `patchid:' pre-filled, and the form below the
patch has `dfblob:' pre-filled. Subject (`s:') isn't pre-filled, yet
(haven't decided how to signify that's optional in the UI).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-07 21:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-07 17:25 RFE: commit git-patch-id lookup links Konstantin Ryabitsev
2022-10-07 21:14 ` Eric Wong
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).