guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#65352] Fix time-machine and network


From: Maxim Cournoyer
Subject: [bug#65352] Fix time-machine and network
Date: Tue, 05 Sep 2023 16:33:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi Simon,

Simon Tournier <zimon.toutoune@gmail.com> writes:

[...]

>>From e1fdd6748ebb1088fb805d77cfb176758bab5618 Mon Sep 17 00:00:00 2001
> Message-Id: 
> <e1fdd6748ebb1088fb805d77cfb176758bab5618.1693826861.git.zimon.toutoune@gmail.com>
> From: Simon Tournier <zimon.toutoune@gmail.com>
> Date: Mon, 4 Sep 2023 13:23:59 +0200
> Subject: [PATCH] guix: git: Add default case when resolving reference.
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Reported by Ludovic Courtès <ludo@gnu.org>.
>
> * guix/git.scm (resolve-reference): Return #false when the reference is not
> resolved.
> ---
>  guix/git.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/guix/git.scm b/guix/git.scm
> index ebe2600209d4..d4076d4a0a0c 100644
> --- a/guix/git.scm
> +++ b/guix/git.scm
> @@ -282,7 +282,8 @@ (define (resolve-reference repository ref)
>           (if (= OBJ-TAG (object-type obj))
>               (object-lookup repository
>                              (tag-target-id (tag-lookup repository oid)))
> -             obj))))))
> +             obj)))
> +      (_ #f))))

This doesn't look right to me; the contract of resolve-reference is to
accept a REF, which is well defined.  It's not supposed fall into cracks
and return #f.  The problem lies elsewhere.

-- 
Thanks,
Maxim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]