Jeff King [off-list ref] writes:
On Mon, Nov 30, 2015 at 12:40:53PM +0100, SZEDER Gábor wrote:
quoted
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.
quoted
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.
Yeah, "finalize" came to me but "write" is far easier to understand
by laypeople.