refs API: post-migration API renaming [1/2]
In preceding commits all callers of refs_resolve_ref_unsafe() were migrated to the transitory refs_werrres_ref_unsafe() function. As a first step in getting rid of it let's remove the old function from the public API (it went unused in a preceding commit). We then provide both a coccinelle rule to do the rename, and a macro to avoid breaking the existing callers. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
4755d7dff7
commit
25a33b3342
15
refs.c
15
refs.c
@ -1669,7 +1669,7 @@ int refs_read_raw_ref(struct ref_store *ref_store, const char *refname,
|
||||
type, failure_errno);
|
||||
}
|
||||
|
||||
const char *refs_werrres_ref_unsafe(struct ref_store *refs,
|
||||
const char *refs_resolve_ref_unsafe(struct ref_store *refs,
|
||||
const char *refname,
|
||||
int resolve_flags,
|
||||
struct object_id *oid,
|
||||
@ -1766,19 +1766,6 @@ const char *refs_werrres_ref_unsafe(struct ref_store *refs,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char *refs_resolve_ref_unsafe(struct ref_store *refs, const char *refname,
|
||||
int resolve_flags, struct object_id *oid,
|
||||
int *flags)
|
||||
{
|
||||
int failure_errno = 0;
|
||||
const char *refn;
|
||||
refn = refs_werrres_ref_unsafe(refs, refname, resolve_flags,
|
||||
oid, flags, &failure_errno);
|
||||
if (!refn)
|
||||
errno = failure_errno;
|
||||
return refn;
|
||||
}
|
||||
|
||||
/* backend functions */
|
||||
int refs_init_db(struct strbuf *err)
|
||||
{
|
||||
|
Reference in New Issue
Block a user