diff options
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 22 |
1 files changed, 9 insertions, 13 deletions
@@ -12,18 +12,6 @@ struct string_list_item; struct worktree; /* - * Callers should not inspect "errno" on failure, but rather pass in a - * "failure_errno" parameter, on failure the "errno" will indicate the - * type of failure encountered, but not necessarily one that came from - * a syscall. We might have faked it up. - */ -const char *refs_werrres_ref_unsafe(struct ref_store *refs, - const char *refname, - int resolve_flags, - struct object_id *oid, - int *flags, int *failure_errno); - -/* * Resolve a reference, recursively following symbolic refererences. * * Return the name of the non-symbolic reference that ultimately pointed @@ -70,16 +58,24 @@ const char *refs_werrres_ref_unsafe(struct ref_store *refs, * resolved. The function returns NULL for such ref names. * Caps and underscores refers to the special refs, such as HEAD, * FETCH_HEAD and friends, that all live outside of the refs/ directory. + * + * Callers should not inspect "errno" on failure, but rather pass in a + * "failure_errno" parameter, on failure the "errno" will indicate the + * type of failure encountered, but not necessarily one that came from + * a syscall. We might have faked it up. */ #define RESOLVE_REF_READING 0x01 #define RESOLVE_REF_NO_RECURSE 0x02 #define RESOLVE_REF_ALLOW_BAD_NAME 0x04 +#define refs_werrres_ref_unsafe(refs, refname, resolve_flags, oid, flags, failure_errno) \ + refs_resolve_ref_unsafe(refs, refname, resolve_flags, oid, flags, failure_errno) const char *refs_resolve_ref_unsafe(struct ref_store *refs, const char *refname, int resolve_flags, struct object_id *oid, - int *flags); + int *flags, int *failure_errno); + const char *resolve_ref_unsafe(const char *refname, int resolve_flags, struct object_id *oid, int *flags); |