Subject: [bug#78034] [PATCH] guix: transformations: git source transformations honour RECURSIVE?.

From: Romain Garbage <[email-masked]>
Date: Fri, 25 Apr 2025 10:34:39 +0200

Ludovic Courtès <[email-masked]> writes:

> Hello!

Hi Ludo'

> Overall LGTM!  Minor suggestions:
>
> Romain GARBAGE <[email-masked]> writes:
>
>> +                      ;; Try to propagate RECURSIVE? from the package source when it
>> +                      ;; is a git-checkout or a git-reference, keeping TRUE as
>> +                      ;; default in other cases.
>> +                      (let ((url recursive? (guard (c ((formatted-message? c )
>> +                                                       (values url #t)))
>> +                                              (package-git-url+recursive? old))))
>
> Instead of catching ‘formatted-message?’, I would rather add an ‘if’ for
> origin + git-reference or git-checkout.

Done in v2.

>> --- a/tests/transformations.scm
>> +++ b/tests/transformations.scm
>> @@ -217,8 +217,7 @@ (define-module (test-transformations)
>>  
>>  (test-equal "options->transformation, with-branch"
>>    (git-checkout (url "https://example.org")
>> -                (branch "devel")
>> -                (recursive? #t))
>> +                (branch "devel"))
>
> IWBN to add a test where (recursive? #t) is inherited.

Done in v2: I added 2 tests, one form WITH-COMMIT and one for
WITH-BRANCH.

Romain