diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2021-10-16 11:39:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-16 11:17:02 -0700 |
commit | 8b72fea7e91b5900c3a35891df1d8ea16d4b2bee (patch) | |
tree | 5d0c064a0a876640d0c6754858ae7b03bd77a056 /refs/refs-internal.h | |
parent | refs API: add a version of refs_resolve_ref_unsafe() with "errno" (diff) | |
download | tgif-8b72fea7e91b5900c3a35891df1d8ea16d4b2bee.tar.xz |
refs API: make refs_read_raw_ref() not set errno
Add a "failure_errno" to refs_read_raw_ref(), his allows
refs_werrres_ref_unsafe() to pass along its "failure_errno", as a
first step before its own callers are migrated to pass it further up
the chain.
We are leaving out out the refs_read_special_head() in
refs_read_raw_ref() for now, as noted in a subsequent commit moving it
to "failure_errno" will require some special consideration.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/refs-internal.h')
-rw-r--r-- | refs/refs-internal.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h index 72746407fc..c87f1135e5 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -149,9 +149,9 @@ struct ref_update { const char refname[FLEX_ARRAY]; }; -int refs_read_raw_ref(struct ref_store *ref_store, - const char *refname, struct object_id *oid, - struct strbuf *referent, unsigned int *type); +int refs_read_raw_ref(struct ref_store *ref_store, const char *refname, + struct object_id *oid, struct strbuf *referent, + unsigned int *type, int *failure_errno); /* * Write an error to `err` and return a nonzero value iff the same |