From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59906) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jR1eW-00036f-Ja for guix-patches@gnu.org; Tue, 21 Apr 2020 18:46:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jR1eU-00061w-Mm for guix-patches@gnu.org; Tue, 21 Apr 2020 18:46:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39368) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jR1eU-0005yV-2C for guix-patches@gnu.org; Tue, 21 Apr 2020 18:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jR1eT-0007Ng-Rz for guix-patches@gnu.org; Tue, 21 Apr 2020 18:46:01 -0400 Subject: [bug#40643] [PATCH] git-version: Handle invalid arguments gracefully Resent-Message-ID: Date: Wed, 22 Apr 2020 00:45:45 +0200 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200421224545.ztr7beu3mqaufyo3@gravity> References: <20200415151824.22988-1-kuba@kadziolka.net> <87v9lx95j7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ru4324lpjy2dzlq4" Content-Disposition: inline In-Reply-To: <87v9lx95j7.fsf@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 40643@debbugs.gnu.org --ru4324lpjy2dzlq4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 17, 2020 at 11:16:44PM +0200, Ludovic Court=C3=A8s wrote: > Hi Jakub, >=20 > Jakub K=C4=85dzio=C5=82ka skribis: >=20 > > * guix/git-download.scm (git-version): Add a check for commit ID length. > > --- > > If you're curious for the motivation, see [1]. This took a while to > > debug, so I'm hoping to ease this for the next person who inevitably > > stumbles upon this. Is a change like this okay? >=20 > Yes, I think so. The =E2=80=98error=E2=80=99 procedure is not great, we = would rather > use =E2=80=98raise=E2=80=99 with a =E2=80=98&message=E2=80=99 condition (= which additionally allows for > i18n) but it=E2=80=99s no big deal here. I considered using raise instead, but I couldn't get it to work properly. I was getting a "Wrong type (expecting exact integer)" error instead: (raise (condition (&message (message "git-version: commit ID unexpectedly short")))) Do you know why that might be? Regards, Jakub K=C4=85dzio=C5=82ka --ru4324lpjy2dzlq4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl6fd5MACgkQ4xWnWEYT FWRU1BAAjPJ6kRmZHq80VzCFfpao+YGAcQoOo/jX4RrYl9SOwvMfTKTV1rf1jv/2 7QV4Z/q6jg7xPcBkuPL2M+BZB8P3ELlRnTQPZcPhojYEb7R4u+C+7r3otSb8L26V sNEHXCjbUbgHdKMBgAU48oAHtT6cFgFOo5h7Lnkz6JwIUU1K65VOAuh7O30UI9bm dfgNnIUh0RRT8jLSkcUqsCC90XdwEs/jxTihIzMwoFIWRBdWj17lgUtoQWSQjd00 pX2QidfKaYr7fxJgY7qiG/0hTFwLBkpduIRmFB48Btoc+eeEEWAvmcV4ShBz2pjE 1RQQsP3u73x0SOOAWKBjegA3xXmtbZwzVrmJgXYeyXFxukGMhYOIpSEQDQYQE45j u6A6mE3NbzaPUJGtaA6xOBr4P7YOccg35C2ZsdtKHNopRDaLgcKnol8vaitADsNB u8mO3F1V32TpGXovtifZz992INEzuym2zR/SrgAC3OS9DbKQpbVLqA78PxfIJDT0 QEuXF5oAdpDzvyLkZPpTxKd2hIECTM37r/FPl8TH5FFzLlpAUZFXJAeXFilqrbJD im/Te1lQ0bTPpYmSIXBdcat3ZdBnjYAC5WzwYuSkhPl3w7iaj168MT243e8umH5X HT1Q+/nZlfA2mkLadpA+rxRTxvO1PLbz0B2HAOxSSLG2upH7OA8= =81vp -----END PGP SIGNATURE----- --ru4324lpjy2dzlq4--