Re: [PATCH] open_sha1_file: report "most interesting" errno

2014-05-15 Thread Jeff King
On Thu, May 15, 2014 at 10:02:06AM -0700, Junio C Hamano wrote: > > $ chmod 0 .git/objects/??/* > > $ git rev-list --all > > fatal: loose object b2d6fab18b92d49eac46dc3c5a0bcafabda20131 (stored in > > .git/objects/b2/d6fab18b92d49eac46dc3c5a0bcafabda20131) is corrupt > > H.

Re: [PATCH] open_sha1_file: report "most interesting" errno

2014-05-15 Thread Junio C Hamano
Jeff King writes: > When we try to open a loose object file, we first attempt to > open in the local object database, and then try any > alternates. This means that the errno value when we return > will be from the last place we looked (and due to the way > the code is structured, simply ENOENT i