From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 959C11F4D7; Thu, 12 May 2022 19:38:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1652384339; bh=UPaWmLCXuXpWp03bnj9QoHnsjbK4b/MuKolaN2wJnJQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1pfMg3FzFwZhHfJUH/hPk4V2B07Scc8S0xFUDrQVWsBrj3axAckc8NsiwfjMC25tz vrmILKd5nZ+7SoBtbklYijdmoCG1FC554BFfbn949xOOm1VOmD/Mle46cZnzwDd0CZ lYd2TVsOCVdIK3h8TsbHdtdOb561CSQKhT4ko9w8= Date: Thu, 12 May 2022 19:38:59 +0000 From: Eric Wong To: Konstantin Ryabitsev Cc: meta@public-inbox.org Subject: Re: RFC: hooks in public-inbox-watch Message-ID: <20220512193859.M526956@dcvr> References: <20220512180442.ais2ujjolq53vkio@meerkat.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220512180442.ais2ujjolq53vkio@meerkat.local> List-Id: Konstantin Ryabitsev wrote: > Hi, all: > > What do you think about a mechanism to run hooks at the stage right before > public-inbox-watch adds a new message to the archive? One feature that would > be neat is to search archives for all instances of the same patch using its > $(git-patch-id --stable) and adding a header, e.g.: > > X-Git-Patch-ID: 19c05284cea20b72b44c2b7e6cfd782a6a860cf1 0000000000000000000000000000000000000000 There shouldn't be any need for a header. I've been meaning to teach -index to use git-patch-id and index it's output, anyways. That would work for old messages, too. > I know this can be done at the postfix stage, but seems like it would be more > efficient at the ingestion stage. > > Maybe even instead of a hook this could be a native public-inbox feature, with > this header being indexed by default? I've always tried as hard as possible to avoid adding new headers or extra data; especially when we have a common and stable tool to generate it. Another danger is a malicious client could also be introducing wrong ones to confuse searches. Thanks.