From: "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: Junio C Hamano <junkio@cox.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] entry.c: Use strerror() to print error info when possible
Date: Sun, 15 Apr 2007 20:57:09 -0300 [thread overview]
Message-ID: <20070415205709.27d7e475@gnut> (raw)
In-Reply-To: <20070415230020.GC4417@steel.home>
Em Mon, 16 Apr 2007 01:00:20 +0200
Alex Riesen <raa.lkml@gmail.com> escreveu:
| Luiz Fernando N. Capitulino, Sun, Apr 15, 2007 23:56:19 +0200:
| >
| > Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
| > ---
| > entry.c | 11 ++++++-----
| > 1 files changed, 6 insertions(+), 5 deletions(-)
| >
| > diff --git a/entry.c b/entry.c
| > index d72f811..c36c09d 100644
| > --- a/entry.c
| > +++ b/entry.c
| > @@ -19,7 +19,8 @@ static void create_directories(const char *path, struct checkout *state)
| > if (!stat(buf, &st) && S_ISDIR(st.st_mode))
| > continue; /* ok */
| > }
| > - die("cannot create directory at %s", buf);
| > + die("cannot create directory at %s (%s)", buf,
| > + strerror(errno));
|
| This errno is not very useful, as it may come from the stat above, and
| you provided no way to figure out what was the syscall (the mkdir or
| the stat) which failed. Also, the errnos of unlink or mkdir just above
| the stat are just lost.
|
| It is not worse than before, but not very much better either, and
| probably confusing. I suggest you just leave this one as it is.
Will do, thanks for reviewing Alex.
prev parent reply other threads:[~2007-04-15 23:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-15 21:56 [PATCH] entry.c: Use strerror() to print error info when possible Luiz Fernando N. Capitulino
2007-04-15 22:54 ` Junio C Hamano
2007-04-15 23:54 ` Luiz Fernando N. Capitulino
2007-04-15 23:00 ` Alex Riesen
2007-04-15 23:57 ` Luiz Fernando N. Capitulino [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070415205709.27d7e475@gnut \
--to=lcapitulino@mandriva.com.br \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=raa.lkml@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.
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 NNTP newsgroup(s).