From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 05 05:07:15 2022 Received: (at 50072) by debbugs.gnu.org; 5 Jan 2022 10:07:15 +0000 Received: from localhost ([127.0.0.1]:39616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n53CN-0004Th-EM for submit@debbugs.gnu.org; Wed, 05 Jan 2022 05:07:15 -0500 Received: from michel.telenet-ops.be ([195.130.137.88]:59924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n53CL-0004TW-H4 for 50072@debbugs.gnu.org; Wed, 05 Jan 2022 05:07:14 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by michel.telenet-ops.be with bizsmtp id ey7B2600H4UW6Th06y7CKh; Wed, 05 Jan 2022 11:07:12 +0100 Message-ID: <52e7be94d926aa06c2a0132090e8c212381e7900.camel@telenet.be> Subject: Re: bug#50072: [PATCH WIP 0/4] Add upstream updater for git-fetch origins. From: Maxime Devos To: zimoun Date: Wed, 05 Jan 2022 11:07:06 +0100 In-Reply-To: <867dbfcf9n.fsf_-_@gmail.com> References: <20220104200643.43374-1-maximedevos@telenet.be> <20220104200643.43374-2-maximedevos@telenet.be> <867dbfcf9n.fsf_-_@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-K0kdrlY7wUTtQSQn9jfZ" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1641377232; bh=nKKd+dR69zkBc3O718gcGXeHQfPTkAOiQdoxFzF2so4=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=I4xSLBinmkOGdnZN61ReikSu9XVBk+IjLnQijTLY1MgxJgljbo6d+/X3fyI58aJPA RomE0Q30v2lZ8fHCVcsgD9Dk8ocbQc0lvqXipe7arrXlcTG+P7deyzH2VlhRFKxMfD jgyxUeerDQIiWLi2g+Cdh64Vv1ptdg4dT/soJEUrtLUe2mqMCMRXCbIOGKucZg0kID 25PqiTloizppeN4FNAgMJW70NUNLir+AvCkqcHG2BRyp5PKAcvkPsqqOt7gNIpYy0M +gjgOImCkq1Fo7BClFVSU/wb+HRPJjfc9Ls/+gJJuI8doVmXvFtPtKLwElNWTUoAPp m2LaBz6KTqfYg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50072 Cc: Sarah Morgensen , 50072@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-K0kdrlY7wUTtQSQn9jfZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable zimoun schreef op di 04-01-2022 om 23:22 [+0100]: > 2) =E2=80=99auto=E2=80=99 is confusing=E2=80=A6 >=20 > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (select? (negate vcs-fi= le?))) > > +=C2=A0 "Compute the hash of FILE with ALGORITHM.=C2=A0 If RECURSIVE? i= s #true or 'auto', > > +recurse into subdirectories of FILE, computing the combined hash (nar = hash) of >=20 > =E2=80=A6here I understand that =E2=80=99auto=E2=80=99 means #true=E2=80= =A6 Precisely, in the sense 'auto' means #true in that 'auto' recurses. But sometimes #true / auto compute a different hash ... > > +Keep in mind that the hash of a regular file depends on RECURSIVE?: > > +if the recursive hash is desired, it must be set to #true.=C2=A0 Other= wise, it must > > +be set to #false or 'auto'. In most situations, the non-recursive hash= is desired > > +for regular files." >=20 > =E2=80=A6but there it is the contrary. :-) No, when #:recursive? is 'auto' and the file is a directory, it recurses. When it is 'auto' and the file is a regular file, then it also recurses, albeit in a trivial way (because regular files don't contain other files). This comment explains that the 'recursive hash' (nar hash) and 'regular hash' of a regular file are different, that usually you want the regular hash for regular files, and implies that '#:recursive? auto' usually does the right thing. But if you really want the recursive hash for regular files, then you can still compute that by setting #:recursive? #true. > =C2=A0 To me, #true/#false or #t/#f are > meaningful, especially when=E2=80=A6 >=20 > > +=C2=A0 (if (or (eq? recursive? #true) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (and (eq? recur= sive? 'auto) >=20 > =E2=80=A6the symbol =E2=80=99auto=E2=80=99 is only used here.=C2=A0 IIRC = all the series. :-) In =E2=80=98[PATCH v4 3/4] refresh: Support non-tarball sources.=E2=80=99, = there's > + (let ((hash (file-hash* output))) There, #:recursive? is 'auto'. Greetings, Maxime --=-K0kdrlY7wUTtQSQn9jfZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYdVtyhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vd0AQC28roqlHxi5wsBXMukpA1Xlmp+ j8YOaunayI8shlCfbwEA2LdofI6Mqy06DFcjCFRONrh8BDgdD5wQ4yFSoU6qgg0= =sKUQ -----END PGP SIGNATURE----- --=-K0kdrlY7wUTtQSQn9jfZ--