From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YMShAp1Mz2b8NwAAqHPOHw:P1 (envelope-from ) for ; Wed, 28 Aug 2024 16:13:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YMShAp1Mz2b8NwAAqHPOHw (envelope-from ) for ; Wed, 28 Aug 2024 18:13:17 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b=HG+p9BHm; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724861596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=d7R67hPGOB98odHxwPfkAqf0B8RvEr1X48or/TpyuWg=; b=IkcH+wyo3ZytdmRcWNlEdxSVPAAJ6JOMWcljlvTtU3jQmPvp/ICDbgP20BSIkpHA8KdYcR OWFDI0YjxqS1ILeIl/vrNqmUm/wNfqaXDN7YHO7YfRCg5AVxH72uB+exOU0AysEa/ba96L ZcWWCdv2VdA1QlIDh+PFvq3Ee7dp9JANDe34fDmA6VUsGdRyIwTjbEaS2sFvbkNGfeS5g2 R41Tp0ocQXv9DaEasnA8Opnw2M6K9l3BpxrO80Vg1sumG3ovB+i+42+hn/c5rYEAnoP34x fD6/czUE4X+S7msRkGYi7Ku12FB0AeDLhqy3XK/X99dlFYlcsNcOO8mdmQYS6A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724861596; a=rsa-sha256; cv=none; b=F3iqoFe8kPn/7XRhqqXNgIMdc2Gs/KARjsda5L30FHUCjl7eK/fURI81WwfXPeHOxozGXa tudRIq2u9OgW6ASwEK8gj565T00nrJbR6MzwEyO8yz2A0N6ZXv/DGSWjhst1OqdClbcyIi ks7bXwPbNISEQ+jIpMNiFSKvvJCjebEpEfVyzw/lzC++Xot4obCp4kNN9lH021sRh8EmPK 4surukdJnoBq6pTW2MExmysfGcNUQGHlvAQaDQnkXW+bZq1MUz1uQaceerEDGbpAFPc4Pl I3dLsjmUskXPXbMZnM26Qx7pcdaY3YrK/Xrcq/C9mWpYqPkD+feNrTFm/gnyIw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b=HG+p9BHm; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D37441298E for ; Wed, 28 Aug 2024 18:13:16 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 485545F5E3; Wed, 28 Aug 2024 16:07:23 +0000 (UTC) Received: from phubs.tethera.net (phubs.tethera.net [IPv6:2607:5300:60:3a9d::1]) by mail.notmuchmail.org (Postfix) with ESMTPS id DE30C5F370 for ; Wed, 28 Aug 2024 16:07:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tethera.net; i=@tethera.net; q=dns/txt; s=2024; t=1724861238; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : from; bh=kEXwFsZDuHtLxttO6Md0SvH053zEm7T/nGwnQQ7u5XY=; b=HG+p9BHm41/Nb5q/BWRLEyUvR8NAlJHuVtybGxEXPW/SrW71w5fdvTsckUVPu4lLtyXrY vwm1KegEtUf6woWZTgdqTNVM63Qu9stlM7A4Ja68CkfsiJplmBg81sainjq2Yu9UKo3lKqa HJol+u4CzDWrKUb3owaglAOJY24nuxYMucVsQEBm3JCPES7EdAKaDUde+doCx9zdnRZlQwP MJr846JN0g5knyl3Jh3dmKvDfA3uQsUQaYTre6lht01mQl/6TRAUyyilR/k7o/E7o/v7qOv NUtMRbUfej5pQjrhtQLYkyDkP0Ub/D3R8q9GvKZJcIWYqdnZEkQ9HAz7wyLA== Received: from tethera.net (unknown [207.194.98.244]) by phubs.tethera.net (Postfix) with ESMTPS id 1280218006E; Wed, 28 Aug 2024 13:07:17 -0300 (ADT) Received: (nullmailer pid 869215 invoked by uid 1000); Wed, 28 Aug 2024 16:07:15 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: WIP: git-remote-notmuch Date: Wed, 28 Aug 2024 08:45:53 -0700 Message-ID: <20240828160710.866567-1-david@tethera.net> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: YTHKQ6KAYPJFPOIUXTN5R7TYQAKRV6OE X-Message-ID-Hash: YTHKQ6KAYPJFPOIUXTN5R7TYQAKRV6OE X-MailFrom: bremner@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." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE X-Migadu-Queue-Id: D37441298E X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -1.75 X-Spam-Score: -1.75 X-TUID: ey7RfvoW+rE+ I wanted to try out Felipe's idea of using a remote helper to replace / augment the existing notmuch-git script, but I didn't want to require language bindings. Porting Felipe's ruby script to C led to a predictable amount of increase in the number of lines of code, but it seems to work. There are a couple of points to note 0) Currently this is not used by notmuch-git at all. 1) Felipe's original script didn't have an explicit license grant, but I added the standard notmuch GPL3+ license to my rewrite. Hopefully that is OK for Felipe. 2) I renamed to git-remote-notmuch, so the corresponding URLs start with notmuch:: instead of nm:: 3) The original script took a path to mail_root, but this doesn't really cover the possible split configurations; in particular it doesn't handle my (XDG) layout. The current code just looks for the "default" notmuch setup, and ignores the URL. I am open to ideas for how a notmuch URL should look like. I'd imagine they should have the profile in them, but I'm not sure how much flexibility we need / want to suppot. 4) the code is a bit rough and ready, with error handling mainly consisting of asserts. 5) There is currently no documentation, see test/T860 and perf-test/T08 for hints. 6) The remote helper is potentially complimentary to git-notmuch/nmbug as it provides a more standard (to git users) interface. git-notmuch could probably transition to a wrapper.