git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: commit -> public-inbox link helper

From
Jeff King <peff@peff.net>
Date
Apr 4, 2018, 18:36 UTC
Message-ID
<20180404183620.GC9055@sigill.intra.peff.net>
In-Reply-To
<nycvar.QRO.7.76.6.1804041821420.55@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
On Wed, Apr 04, 2018 at 06:35:59PM +0200, Johannes Schindelin wrote:
Show 17 quoted lines
> Hi team,
> 
> I found myself in dear need to quickly look up mails in the public-inbox
> mail archive corresponding to any given commit in git.git. Some time ago,
> I wrote a shell script to help me with that, and I found myself using it a
> couple of times, so I think it might be useful for others, too.
> 
> This script (I call it lookup-commit.sh) needs to be dropped into a *bare*
> clone of http://public-inbox.org/git, and called with its absolute or
> relative path from a git.git worktree, e.g.
> 
> 	~/public-inbox-git.git/lookup-commit.sh \
> 		fea16b47b603e7e4fa7fca198bd49229c0e5da3d
> 
> This will take a while initially, or when the `master` branch of the
> public-inbox mirror was updated, as it will generate two files with
> plain-text mappings.

Junio publishes a git-notes ref with the mapping you want. So you can do:

  git fetch git://github.com/gitster/git.git refs/notes/amlog:refs/notes/amlog
  mid=$(git notes --ref amlog show $commit | perl -lne '/<(.*)>/ and print $1')
  echo "https://public-inbox.org/git/$mid"

without having to download the gigantic list archive repo at all (though I do keep my own copy of the archive and index it with mairix, so I can use "mairix -t m:$mid" and then view the whole thing locally in mutt).

-Peff
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 2 of 7 in “commit -> public-inbox link helper”
  1. Johannes SchindelinApr 4, 2018
  2. Jeff KingApr 4, 2018
  3. Johannes SchindelinApr 4, 2018
  4. Mike RappazzoApr 4, 2018
  5. Johannes SchindelinApr 4, 2018
  6. Eric WongApr 20, 2018
  7. Johannes SchindelinApr 20, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.