X-Envelope-From: notmuch-bounces@notmuchmail.org  Mon Jun  1 23:35:01 2026
Return-Path: <notmuch-bounces@notmuchmail.org>
X-Original-To: nmbug@yantan.tethera.net
Delivered-To: nmbug@yantan.tethera.net
Received: from yantan.tethera.net (localhost [127.0.0.1])
	by mail.notmuchmail.org (Postfix) with ESMTP id 3EC845F5CA;
	Mon,  1 Jun 2026 23:35:01 +0000 (UTC)
Received: from phubs.tethera.net (phubs.tethera.net [IPv6:2607:5300:60:3a9d::1])
	by mail.notmuchmail.org (Postfix) with ESMTPS id DD09A5F5B3
	for <notmuch@notmuchmail.org>; Mon,  1 Jun 2026 23:34:58 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tethera.net;
 i=@tethera.net; q=dns/txt; s=2024; t=1780356896; h=from : to : subject
 : in-reply-to : references : date : message-id : mime-version :
 content-type : from; bh=JJbEuOHwu8g43QpWsaV1J7gYCRiRWn2mNI+2yMIw3Xo=;
 b=lBfvEgRB0jQEW5btXyq5rNIwSwfUnsLI7ULezOfxsn9U25z/0VdHqQdBTBjz0z4eQwDbr
 K/zK+dJIBdi4NpXjijEoo2l0HpQ5CPjS5mUN7b4hvSX9rCx89IO4gu964bXLsLm9KItvE4g
 UBs5kezy/gkXugFoGNnfGiClE3ghZntl729UthEC81jj19MKcqFhSKdQa2cWusjxIULgOLQ
 r04xqbRRHlpIZ92ixSG+Bu0c959V/vY7QW9Zr9YJ87VakKnuvkTmpzz2veaSMOXttUDEpC3
 3d9sZp9SERSpvUvVb+K4UscZWx7JaED+eHyYvuzhmHxIjJPaGjodFSQlLBfA==
Received: from tethera.net (unknown [IPv6:2001:268:c0cd:6a00:f89a:7804:5219:4])
	by phubs.tethera.net (Postfix) with ESMTPS id 8729E1800F7;
	Mon, 01 Jun 2026 20:34:55 -0300 (ADT)
Received: (nullmailer pid 3004034 invoked by uid 1000);
	Mon, 01 Jun 2026 23:34:52 -0000
From: David Bremner <david@tethera.net>
To: Stephen J Eglen <sje30@cam.ac.uk>, notmuch@notmuchmail.org
Subject: Re: Tags in the headers of mail files
In-Reply-To: <m1fr368ru8.fsf@sje30.cam>
References: <m1mrxf8mkt.fsf@sje30.cam> <87pl2bxjpu.fsf@tethera.net>
 <m1fr368ru8.fsf@sje30.cam>
Date: Tue, 02 Jun 2026 08:34:52 +0900
Message-ID: <87h5nlygv7.fsf@tethera.net>
MIME-Version: 1.0
Message-ID-Hash: GMSVJECXRXWJ2PORYD36BISUDJE6WENG
X-Message-ID-Hash: GMSVJECXRXWJ2PORYD36BISUDJE6WENG
X-MailFrom: david@tethera.net
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.3
Precedence: list
List-Id: "Use and development of the notmuch mail system." <notmuch.notmuchmail.org>
List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
List-Owner: <mailto:notmuch-owner@notmuchmail.org>
List-Post: <mailto:notmuch@notmuchmail.org>
List-Subscribe: <mailto:notmuch-join@notmuchmail.org>
List-Unsubscribe: <mailto:notmuch-leave@notmuchmail.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Stephen J Eglen <sje30@cam.ac.uk> writes:

> That sounds very interesting David.  Where can I learn more about the git-remote-notmuch code?
>
> Best wishes,
>

You'll need a checkout of branch master from

       git clone https://git.notmuchmail.org/git/notmuch

The code is a bit indirect, as it's working via git-fast-export protocol
rather than creating files directly. Hopefully you can at least decode
the naming conventions and path encoding from there. There is also
documentation in docs/man1/git-remote-notmuch.rst, which is short enough
to reproduce here:

    Inside the prefix directory, there is a directory corresponding to
    each message-id in the notmuch database. The path of this directory is
    obtained by taking the first two bytes of the SHA1 hash of the
    message-id, followed by the hex escaped (in the manner documented in
    :any:`notmuch-dump(1)`) message name. For example, the message-id ``discourse/post/15986@community.mnt.re`` corresponds to directory::

          _notmuch_metadata/ae/27/discourse%2fpost%2f15986@community.mnt.re

    Inside each such directory is a (possibly empty) file containing the tags for that message, one per line.

Missing detail, the file is called "tags".
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org
