All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Han-Wen Nienhuys <hanwen@google.com>,
	Jeff King <peff@peff.net>
Subject: ab/refs-errno-cleanup & "errno" removal in the refs backend
Date: Wed, 06 Oct 2021 12:26:46 +0200	[thread overview]
Message-ID: <87ee8yiguc.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqo884tkxd.fsf@gitster.g>


On Mon, Oct 04 2021, Junio C Hamano wrote:

> * 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/

      parent reply	other threads:[~2021-10-06 10:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 23:44 What's cooking in git.git (Oct 2021, #01; Mon, 4) Junio C Hamano
2021-10-04 23:52 ` Taylor Blau
2021-10-05 16:01 ` ab/refs-errno-cleanup Ævar Arnfjörð Bjarmason
2021-10-05 16:47 ` hm/paint-hits-in-log-grep Ævar Arnfjörð Bjarmason
2021-10-05 17:07 ` ab/designated-initializers-more Ævar Arnfjörð Bjarmason
2021-10-05 20:47 ` ab/fsck-unexpected-type (and "cat-file replace handling and optimization") Ævar Arnfjörð Bjarmason
2021-10-05 22:01   ` Jeff King
2021-10-06  8:54     ` Ævar Arnfjörð Bjarmason
2021-10-07 21:37     ` Junio C Hamano
2021-10-08  2:25       ` Jeff King
2021-10-08 20:50         ` Junio C Hamano
2021-10-06 10:14 ` ab/make-sparse-for-real Ævar Arnfjörð Bjarmason
2021-10-06 10:17 ` ab/parse-options-cleanup & ab/align-parse-options-help & ab/help-config-vars Ævar Arnfjörð Bjarmason
2021-10-06 16:44   ` Junio C Hamano
2021-10-06 10:26 ` Ævar Arnfjörð Bjarmason [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee8yiguc.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hanwen@google.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.