All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: David Reiss <dreiss@facebook.com>
Cc: <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] Make git status print a helpful death message if the disk is full
Date: Tue, 1 Sep 2009 22:35:05 +0200	[thread overview]
Message-ID: <200909012235.10091.trast@student.ethz.ch> (raw)
In-Reply-To: <4A9D7B54.5020902@facebook.com>

[-- Attachment #1: Type: Text/Plain, Size: 1042 bytes --]

David Reiss wrote:
> The old behavior just said that it failed.  Now it includes the error
> information, which makes it much easier to debug.
> 
> There is a risk that some failure paths could result in misleading error
> messages that actually make debugging more difficult.
[...]
>  		if (write_cache(fd, active_cache, active_nr) ||
>  		    close_lock_file(&index_lock))
> -			die("unable to write new_index file");
> +			die("unable to write new_index file: %s", strerror(errno));

Junio C Hamano wrote:
> Don't we have die_errno() or something since at least 1.6.4?

Yes.  And during the conversion, I ignored call sites like this one
precisely because I did not (and still do not) have enough knowledge
of the index and lock file machinery to decide at what stage I need to
read errno to get the *real* error message.  You're of course welcome
to dig into the code to verify that the above is correct, but I am
against blindly hoping that it gives the right error.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

      parent reply	other threads:[~2009-09-01 20:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01 19:51 [PATCH] Make git status print a helpful death message if the disk is full David Reiss
2009-09-01 20:19 ` Junio C Hamano
2009-09-01 20:35 ` Thomas Rast [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=200909012235.10091.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=dreiss@facebook.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.