From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-2.6 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 6C9491F404 for ; Wed, 4 Apr 2018 20:59:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752168AbeDDU7S (ORCPT ); Wed, 4 Apr 2018 16:59:18 -0400 Received: from mout.gmx.net ([212.227.15.19]:51985 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751971AbeDDU7R (ORCPT ); Wed, 4 Apr 2018 16:59:17 -0400 Received: from MININT-AIVCFQ2.fareast.corp.microsoft.com ([37.201.195.115]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MIu7d-1f5kN50OqH-002X5D; Wed, 04 Apr 2018 22:59:10 +0200 Date: Wed, 4 Apr 2018 22:59:08 +0200 (DST) From: Johannes Schindelin X-X-Sender: virtualbox@MININT-6BKU6QN.europe.corp.microsoft.com To: Jeff King cc: git@vger.kernel.org Subject: Re: commit -> public-inbox link helper In-Reply-To: <20180404183620.GC9055@sigill.intra.peff.net> Message-ID: References: <20180404183620.GC9055@sigill.intra.peff.net> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K1:RhiKgmgAMQHN69bBWY5c6PUmYrHLmCGPbUgQXkxTEfouVY0OhTm os6sjHEFUywEAuVNYq8P/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PTUUIM6/IN4 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Peff, On Wed, 4 Apr 2018, Jeff King wrote: > On Wed, Apr 04, 2018 at 06:35:59PM +0200, Johannes Schindelin wrote: > > > 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). Good to know! Thanks for the script. And thanks also for the `--ref` trick: I had a look at the man page of git-notes, and it was not immediately obvious that it supports options before the sub-subcommand. The `--ref` description is buried pretty deep in there. Thanks, Dscho