unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: 27865@debbugs.gnu.org
Subject: [bug#27865] [PATCH 2/3] pull: Fetch source code from Git.
Date: Sun, 30 Jul 2017 22:38:47 +0200	[thread overview]
Message-ID: <8760e9fync.fsf@gnu.org> (raw)
In-Reply-To: <87r2wy83rq.fsf@gmail.com> (Mathieu Othacehe's message of "Sun, 30 Jul 2017 15:15:21 +0200")

Hi Mathieu,

Mathieu Othacehe <m.othacehe@gmail.com> 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’t have to be as cautious there.

Thanks for your feedback!

Ludo’.

  reply	other threads:[~2017-07-30 20:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28 20:28 [bug#27865] [PATCH 0/3] Use Guile-Git for 'guix pull' Ludovic Courtès
2017-07-28 20:45 ` [bug#27865] [PATCH 1/3] build: Make Guile-Git a hard requirement Ludovic Courtès
2017-07-28 20:45   ` [bug#27865] [PATCH 2/3] pull: Fetch source code from Git Ludovic Courtès
2017-07-30 13:15     ` Mathieu Othacehe
2017-07-30 20:38       ` Ludovic Courtès [this message]
2017-07-31  9:09         ` Mathieu Othacehe
2017-07-31 13:40           ` Ludovic Courtès
2017-07-31 13:56             ` Mathieu Othacehe
2017-07-28 20:45   ` [bug#27865] [PATCH 3/3] pull: Use the commit ID as the version string Ludovic Courtès
2017-07-31 15:25 ` [bug#27865] [PATCH 0/3] Use Guile-Git for 'guix pull' Ludovic Courtès
2017-08-01 22:10   ` bug#27865: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760e9fync.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=27865@debbugs.gnu.org \
    --cc=m.othacehe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).