Re: [PATCH v11 39/41] refs.c: propagate any errno==ENOTDIR from _commit back to the callers

2014-06-03 Thread Ronnie Sahlberg
On Fri, May 30, 2014 at 5:22 PM, Jonathan Nieder wrote: > Hi, > > Ronnie Sahlberg wrote: > >> For these cases, save the errno value and abort and make sure that the caller >> can see errno==ENOTDIR. >> >> Also start defining specific return codes for _commit, assign -1 as a generic >> error and -2

Re: [PATCH v11 39/41] refs.c: propagate any errno==ENOTDIR from _commit back to the callers

2014-05-30 Thread Jonathan Nieder
Hi, Ronnie Sahlberg wrote: > For these cases, save the errno value and abort and make sure that the caller > can see errno==ENOTDIR. > > Also start defining specific return codes for _commit, assign -1 as a generic > error and -2 as the error that refers to a name conflict. Callers can (and > sho

[PATCH v11 39/41] refs.c: propagate any errno==ENOTDIR from _commit back to the callers

2014-05-27 Thread Ronnie Sahlberg
In _commit, ENOTDIR can happen in the call to lock_ref_sha1_basic, either when we lstat the new refname and it returns ENOTDIR or if the name checking function reports that the same type of conflict happened. In both cases it means that we can not create the new ref due to a name conflict. For the