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

Re: [PATCH] Make error message after failing commit_lock_file() less confusing

From
Jeff King <peff@peff.net>
Date
Dec 1, 2015, 23:17 UTC
Message-ID
<20151201231701.GB13245@sigill.intra.peff.net>
In-Reply-To
<1448883653-9140-1-git-send-email-szeder@ira.uka.de>
On Mon, Nov 30, 2015 at 12:40:53PM +0100, SZEDER Gábor wrote:
Show 7 quoted lines
> The error message after a failing commit_lock_file() call sometimes
> looks like this, causing confusion:
> 
>   $ git remote add remote git@server.com/repo.git
>   error: could not commit config file .git/config
>   # Huh?!
>   # I didn't want to commit anything, especially not my config file!
I like the intent of this patch; I've had the same "huh" moment myself.
> The error message is of course bikeshedable.

You chose "write", which I think is OK. It's really a "rename", and maybe that matters for some values of errno. I'd guess in practice probably not (the likely reason is going to be something like EPERM). And I can't think of a concise way to express rename (just saying "rename" is confusing, too, without indicating that it's from the tempfile to the final resting place).

So perhaps "write" is the best we can do.
-Peff
Previous: SZEDER GáborNext: Junio C Hamano
Message 2 of 8 in “Make error message after failing commit_lock_file() less confusing”
  1. Make error message after failing commit_lock_file() less confusingSZEDER Gábor, Nov 30, 2015
  2. Jeff KingDec 1, 2015
  3. Junio C HamanoDec 2, 2015
  4. Eric SunshineDec 2, 2015
  5. SZEDER GáborDec 3, 2015
  6. Make error message after failing commit_lock_file() less confusingSZEDER Gábor, Dec 3, 2015
  7. credential-store: don't pass strerror to die_errno()SZEDER Gábor, Dec 16, 2015
  8. Jeff KingDec 16, 2015

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.