From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mISMM2VtO2HNGwAAgWs5BA (envelope-from ) for ; Fri, 10 Sep 2021 16:36:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 4DpbL2VtO2EtawAAB5/wlQ (envelope-from ) for ; Fri, 10 Sep 2021 14:36:21 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C5FEDE0C4 for ; Fri, 10 Sep 2021 16:36:20 +0200 (CEST) Received: from localhost ([::1]:52316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOhda-00085l-PC for larch@yhetil.org; Fri, 10 Sep 2021 10:36:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOhdL-00083b-0e for bug-guix@gnu.org; Fri, 10 Sep 2021 10:36:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOhdK-0007fk-PI for bug-guix@gnu.org; Fri, 10 Sep 2021 10:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mOhdK-0000f3-N4 for bug-guix@gnu.org; Fri, 10 Sep 2021 10:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44187: [PATCH 3/3] git: 'reference-available?' recognizes 'tag-or-commit'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 10 Sep 2021 14:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44187 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 44187@debbugs.gnu.org Received: via spool by 44187-submit@debbugs.gnu.org id=B44187.16312845132466 (code B ref 44187); Fri, 10 Sep 2021 14:36:02 +0000 Received: (at 44187) by debbugs.gnu.org; 10 Sep 2021 14:35:13 +0000 Received: from localhost ([127.0.0.1]:38935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOhcX-0000de-87 for submit@debbugs.gnu.org; Fri, 10 Sep 2021 10:35:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOhcQ-0000ci-Rd for 44187@debbugs.gnu.org; Fri, 10 Sep 2021 10:35:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47284) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOhcL-0006hi-L8; Fri, 10 Sep 2021 10:35:01 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=47222 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOhcL-0006Ir-Ay; Fri, 10 Sep 2021 10:35:01 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 10 Sep 2021 16:34:15 +0200 Message-Id: <20210910143415.14783-4-ludo@gnu.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210910143415.14783-1-ludo@gnu.org> References: <87pn0dk61v.fsf@gnu.org> <20210910143415.14783-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631284581; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=LChEw6OjPR8wVY0wSCVjWlvSVEogBWuB0pASbwLL4qM=; b=ZRICGo6GB6P6ZBzdxLdtVFpd1k7NXcmAxyRCqv7f4TQSN4F5F6T3Ke6AnvvlCVThIhtQ8y QmqIHlStuJ//H7VJEz9RfKOxqh7hCdIjfpGjmKyOrsdaMx8SMGnX+q8AYNK3H3JqgX9FUn zI+blS7Lj9u3ETPwljequZsZXwCQ1cmAjcG4uRw2p7NO6j9JaVXIAXnM0uz53Fq+cH0096 tvv8u5oSfz8z7T35/zcbMgxq65j6vuDC7raFPxTqr61/Ik4qsJrULJSSmG7bWfePScQRLB dOO+hbFYh8zJJsh513onRY+3atvXflRNJ/ER1TolRMChDkHmPxE7WqDHDVZ/Qw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631284581; a=rsa-sha256; cv=none; b=q0u+mQ9Jk+8Ko/UrLYjuIFrvz2hZJ4vA2uKtm+yXInAvRgOqUDblER+4muvFkd43o1zE5G a7ORIbZeGdu2D94R6PUpb/ONraDI8FsuDP3PVMJzRqgErc1tRrp9Ka4fgMGlJbSib+FMSp CCnRk0jbj3oTYGyLca1OS90unsUCD5ieM5mFJgBJteG78N0lxv8bh6FOzBA7y33Vf1pxh4 RSWV6BteFZSZE2UBYXxo//hE/vdzI/V3Enj8Z+j8hlpTGhHO8kdehstT8oSRw/B04KqYF2 uMAlDTTRt9/aOEvpI7jW5sYJ//QynerDWXgUhgUuavCHZPluGHJJtsFyj2iobA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: 3.59 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: C5FEDE0C4 X-Spam-Score: 3.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: WWxh42bh+/iW * guix/git.scm (reference-available?): Handle 'tag-or-commit' with a 40-digit hex string. --- guix/git.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/git.scm b/guix/git.scm index 377e09888a..33a111b84a 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -36,7 +36,7 @@ #:use-module (guix sets) #:use-module ((guix diagnostics) #:select (leave)) #:use-module (guix progress) - #:autoload (guix swh) (swh-download) + #:autoload (guix swh) (swh-download commit-id?) #:use-module (rnrs bytevectors) #:use-module (ice-9 format) #:use-module (ice-9 match) @@ -340,7 +340,8 @@ dynamic extent of EXP." "Return true if REF, a reference such as '(commit . \"cabba9e\"), is definitely available in REPOSITORY, false otherwise." (match ref - (('commit . commit) + ((or ('commit . commit) + ('tag-or-commit . (? commit-id? commit))) (let ((len (string-length commit)) (oid (string->oid commit))) (false-if-git-not-found -- 2.33.0