From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbv0T-0007Mi-R6 for guix-patches@gnu.org; Sun, 30 Jul 2017 16:40:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbv0M-0003d2-QI for guix-patches@gnu.org; Sun, 30 Jul 2017 16:40:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60125) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dbv0M-0003cm-Mw for guix-patches@gnu.org; Sun, 30 Jul 2017 16:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dbv0M-0006bi-Em for guix-patches@gnu.org; Sun, 30 Jul 2017 16:40:02 -0400 Subject: [bug#27865] [PATCH 2/3] pull: Fetch source code from Git. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170728204539.21879-1-ludo@gnu.org> <20170728204539.21879-2-ludo@gnu.org> <87r2wy83rq.fsf@gmail.com> Date: Sun, 30 Jul 2017 22:38:47 +0200 In-Reply-To: <87r2wy83rq.fsf@gmail.com> (Mathieu Othacehe's message of "Sun, 30 Jul 2017 15:15:21 +0200") Message-ID: <8760e9fync.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Mathieu Othacehe Cc: 27865@debbugs.gnu.org Hi Mathieu, Mathieu Othacehe skribis: > Nice job ! Error code handling in git is really a welcome addition too > :) > >> + ((? integer? error) ;old Guile-Git >> + (leave (G_ "Git error ~a~%") error)) >> + ((? git-error? error) ;new Guile-Git >> + (leave (G_ "Git error: ~a~%") (git-error-message error))))) > > If an old Guile-Git (without error support) is used git-error? and > git-error-message won't be available anyway, so it is really necessary > to test for an integer ? We could use (defined? 'git-error?), but I thought the above thing was slightly clearer. > I'll use the same piece of code in Cuirass soon. In Cuirass you might even assume you have the latest Guile-Git version available (maybe with a configure check to be on the safe side). We don=E2=80=99t have to be as cautious there. Thanks for your feedback! Ludo=E2=80=99.