From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 14 05:34:09 2022 Received: (at 53608) by debbugs.gnu.org; 14 Feb 2022 10:34:09 +0000 Received: from localhost ([127.0.0.1]:39921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJYgL-0001yC-6M for submit@debbugs.gnu.org; Mon, 14 Feb 2022 05:34:09 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:34874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJYgI-0001xh-Qv for 53608@debbugs.gnu.org; Mon, 14 Feb 2022 05:34:07 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 49C32B12; Mon, 14 Feb 2022 11:34:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bGr4uSXyWvWd; Mon, 14 Feb 2022 11:34:00 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 202A528B; Mon, 14 Feb 2022 11:34:00 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Subject: Re: bug#53608: [PATCH 0/2] Rejecting commits unrelated to the introductory commit References: <20220128173142.7072-1-ludo@gnu.org> <87leyl7yj0.fsf@gnu.org> <2ff5b7962c1258f94554f23128385c593a3ee9de.camel@telenet.be> Date: Mon, 14 Feb 2022 11:33:59 +0100 In-Reply-To: <2ff5b7962c1258f94554f23128385c593a3ee9de.camel@telenet.be> (Maxime Devos's message of "Thu, 10 Feb 2022 23:29:25 +0100") Message-ID: <87tud1ybxk.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 49C32B12 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain,text/x-patch]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53608 Cc: Attila Lendvai , 53608@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Maxime Devos skribis: > Ludovic Court=C3=A8s schreef op wo 09-02-2022 om 00:02 [+0100]: >> Howdy Maxime & Attila, >>=20 >> Did you have a chance to look into this series? >>=20 >> =C2=A0=C2=A0https://issues.guix.gnu.org/53608 >>=20 >> It=E2=80=99s relatively simple but I=E2=80=99d rather have other eyeball= s looking at it. >>=20 >> TIA. :-) > > The concept seems reasonable to me but I cannot tell if the > implementation is good or bad. OK. I went ahead and pushed these two commits: ca87601dd9 git-authenticate: Ensure the target is a descendant of the int= roductory commit. 87d49346f3 git: Add 'commit-descendant?'. The actual change is this extra condition: --=-=-= Content-Type: text/x-patch Content-Disposition: inline @@ -426,6 +428,17 @@ (define commits (verify-introductory-commit repository keyring start-commit signer)) + ;; Make sure END-COMMIT is a descendant of START-COMMIT or of one of + ;; AUTHENTICATED-COMMITS, which are known to be descendants of + ;; START-COMMIT. + (unless (commit-descendant? end-commit + (cons start-commit + authenticated-commits)) + (raise (formatted-message + (G_ "commit ~a is not a descendant of introductory commit ~a") + (oid->string (commit-id end-commit)) + (oid->string (commit-id start-commit))))) + (let ((stats (call-with-progress-reporter reporter (lambda (report) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I encourage everyone to take a look. Thanks, Ludo=E2=80=99. --=-=-=--