git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Make git status print a helpful death message if the disk is full

From
Thomas Rast <trast@student.ethz.ch>
Date
Sep 1, 2009, 20:35 UTC
Message-ID
<200909012235.10091.trast@student.ethz.ch>
In-Reply-To
<4A9D7B54.5020902@facebook.com>
David Reiss wrote:
Show 5 quoted lines
> 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
Previous: Junio C Hamano
Message 3 of 3 in “Make git status print a helpful death message if the disk is full”
  1. Make git status print a helpful death message if the disk is fullDavid Reiss, Sep 1, 2009
  2. Junio C HamanoSep 1, 2009
  3. Thomas RastSep 1, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.