Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Bug: bad errno report from lock_ref_sha1_basic() when contents bad

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:27

Thomas Rast [off-list ref] writes:
As far as I can see lock_ref_sha1_basic() needs a similar check for
REF_ISBROKEN (and presumably the only fix is to nuke it so maybe it
should even suggest that to the user).
Probably.
But in general, the "errno may
be crucial or worthless" interface of lock_ref_sha1_basic() seems a bit
broken...
Sorry, but I am not sure what you mean by this.  The function is fairly
careful using errno to base its decision and even saves errno when it
calls helpers that may overwrite it, so the "interface" does not want "may
be crucial or worthless".  The implementation may have been broken over
time by many patches, but that is a different issue.  Which codepaths
clobber errno, and is it something you can easily fix with a patch or two?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help