GNU bug report logs

#53608 [PATCH 0/2] Rejecting commits unrelated to the introductory commit

PackageSource(s)Maintainer(s)
guix-patches PTS Buildd Popcon
Full log

Message #22 received at 53608@debbugs.gnu.org (full text, mbox, reply):

Received: (at 53608) by debbugs.gnu.org; 14 Feb 2022 10:34:09 +0000
From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 14 05:34:09 2022
Received: from localhost ([127.0.0.1]:39921 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	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 <ludo@gnu.org>) 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: Ludovic Courtès <ludo@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
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 <attila@lendvai.name>, 53608@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -0.0 (/)
[Message part 1 (text/plain, inline)]
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> Ludovic Courtès schreef op wo 09-02-2022 om 00:02 [+0100]:
>> Howdy Maxime & Attila,
>> 
>> Did you have a chance to look into this series?
>> 
>>   https://issues.guix.gnu.org/53608
>> 
>> It’s relatively simple but I’d rather have other eyeballs looking at it.
>> 
>> 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 introductory commit.
  87d49346f3 git: Add 'commit-descendant?'.

The actual change is this extra condition:

[Message part 2 (text/x-patch, 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)
[Message part 3 (text/plain, inline)]
I encourage everyone to take a look.

Thanks,
Ludo’.

Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 02:22:13 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.