git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 2, 2012, 17:30 UTC
Message-ID
<7vhax2ghy1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<878viephzm.fsf@thomas.inf.ethz.ch>
Thomas Rast <trast@inf.ethz.ch> 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?

Previous: Thomas RastNext: Thomas Rast
Message 2 of 3 in “Bug: bad errno report from lock_ref_sha1_basic() when contents bad”
  1. Thomas RastApr 2, 2012
  2. Junio C HamanoApr 2, 2012
  3. Thomas RastApr 2, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.