From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: Attila Lendvai <attila@lendvai.name>, 53608@debbugs.gnu.org
Subject: [bug#53608] [PATCH 0/2] Rejecting commits unrelated to the introductory commit
Date: Mon, 14 Feb 2022 11:33:59 +0100 [thread overview]
Message-ID: <87tud1ybxk.fsf_-_@gnu.org> (raw)
In-Reply-To: <2ff5b7962c1258f94554f23128385c593a3ee9de.camel@telenet.be> (Maxime Devos's message of "Thu, 10 Feb 2022 23:29:25 +0100")
[-- Attachment #1: Type: text/plain, Size: 698 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 844 bytes --]
@@ -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)
[-- Attachment #3: Type: text/plain, Size: 61 bytes --]
I encourage everyone to take a look.
Thanks,
Ludo’.
prev parent reply other threads:[~2022-02-14 10:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 17:31 [bug#53608] [PATCH 0/2] Rejecting commits unrelated to the introductory commit Ludovic Courtès
2022-01-28 17:43 ` [bug#53608] [PATCH 1/2] git: Add 'commit-descendant?' Ludovic Courtès
2022-01-28 17:43 ` [bug#53608] [PATCH 2/2] git-authenticate: Ensure the target is a descendant of the introductory commit Ludovic Courtès
2022-02-08 23:02 ` [bug#53608] [PATCH 0/2] Rejecting commits unrelated to " Ludovic Courtès
2022-02-10 22:29 ` Maxime Devos
2022-02-14 10:33 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tud1ybxk.fsf_-_@gnu.org \
--to=ludo@gnu.org \
--cc=53608@debbugs.gnu.org \
--cc=attila@lendvai.name \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.