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

ab/refs-errno-cleanup & "errno" removal in the refs backend

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 6, 2021, 10:26 UTC
Message-ID
<87ee8yiguc.fsf@evledraar.gmail.com>
In-Reply-To
<xmqqo884tkxd.fsf@gitster.g>
On Mon, Oct 04 2021, Junio C Hamano wrote:
Show 9 quoted lines
> * ab/refs-errno-cleanup (2021-08-25) 4 commits
>  - refs: make errno output explicit for refs_resolve_ref_unsafe
>  - refs: explicitly return failure_errno from parse_loose_ref_contents
>  - branch tests: test for errno propagating on failing read
>  - refs: add failure_errno to refs_read_raw_ref() signature
>
>  The "remainder" of hn/refs-errno-cleanup topic.
>
>  What's the status of this one?  Meh?

(For bystanders, this is ab/*, but it's mostly/entirely Han-Wen's work, although I did modify it a bit. It's patch 5-8/8 of [1])

I tried advocating for it the last time around[2], maybe this helps more: The "errno" variable is still an explicit/implicit part of the refs API, so any backend that doesn't deal with files (i.e. reftable) is likely to have subtle bugs or missing behavior if we don't eliminate it completely at the API boundaries.

This is a start of that, I've got a 8-patch series (largely code deletion/making things "static") that gets us to that point queued up after this.

We'll still be returning errno, just via a variable, and reftable will be faking it up. But once we've gotten to that point it's easy to continue and e.g. making these backends return some structured sensible return values via enums or whatever. I don't have anything planned/written to do that, but that seems logical once we've got "reftable" in addition to the files backend, and perhaps in the future a generic DB backends or whatever.

1. https://lore.kernel.org/git/patch-v10-5.8-fa9260f25fa-20210823T114712Z-avarab@gmail.com/
2. https://lore.kernel.org/git/87zgrnjw7v.fsf@evledraar.gmail.com/
Previous: Junio C Hamano
Message 15 of 15 in “What's cooking in git.git (Oct 2021, #01; Mon, 4)”
  1. Junio C HamanoOct 4, 2021
  2. Taylor BlauOct 4, 2021
  3. ab/refs-errno-cleanupÆvar Arnfjörð Bjarmason, Oct 5, 2021
  4. hm/paint-hits-in-log-grepÆvar Arnfjörð Bjarmason, Oct 5, 2021
  5. ab/designated-initializers-moreÆvar Arnfjörð Bjarmason, Oct 5, 2021
  6. ab/fsck-unexpected-type (and "cat-file replace handling and optimization")Ævar Arnfjörð Bjarmason, Oct 5, 2021
  7. Jeff KingOct 5, 2021
  8. Ævar Arnfjörð BjarmasonOct 6, 2021
  9. Junio C HamanoOct 7, 2021
  10. Jeff KingOct 8, 2021
  11. Junio C HamanoOct 8, 2021
  12. ab/make-sparse-for-realÆvar Arnfjörð Bjarmason, Oct 6, 2021
  13. ab/parse-options-cleanup & ab/align-parse-options-help & ab/help-config-varsÆvar Arnfjörð Bjarmason, Oct 6, 2021
  14. Junio C HamanoOct 6, 2021
  15. ab/refs-errno-cleanup & "errno" removal in the refs backendÆvar Arnfjörð Bjarmason, Oct 6, 2021

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.