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:
signature.asc
Description: This is a digitally signed message part.