diff options
author | David Turner <dturner@twopensource.com> | 2016-04-07 21:03:10 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-10 20:35:41 +0200 |
commit | 2d0663b21661f2677bce5742204ccdd73745a062 (patch) | |
tree | 53cee16fbbf082a26394a960a7b796fae8e8bfc3 /refs/refs-internal.h | |
parent | show_head_ref(): check the result of resolve_ref_namespace() (diff) | |
download | git-2d0663b21661f2677bce5742204ccdd73745a062.tar.xz git-2d0663b21661f2677bce5742204ccdd73745a062.zip |
refs: move resolve_ref_unsafe into common code
Now that resolve_ref_unsafe's only interaction with the backend is
through read_raw_ref, we can move it into the common code. Later,
we'll replace read_raw_ref with a backend function.
Signed-off-by: David Turner <dturner@twopensource.com>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
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, 6 insertions, 0 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h index 92aae80c21..3a4f634cb4 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -197,6 +197,8 @@ const char *find_descendant_ref(const char *dirname, int rename_ref_available(const char *oldname, const char *newname); +/* We allow "recursive" symbolic refs. Only within reason, though */ +#define SYMREF_MAXDEPTH 5 /* Include broken references in a do_for_each_ref*() iteration: */ #define DO_FOR_EACH_INCLUDE_BROKEN 0x01 @@ -206,4 +208,8 @@ int rename_ref_available(const char *oldname, const char *newname); */ int do_for_each_ref(const char *submodule, const char *base, each_ref_fn fn, int trim, int flags, void *cb_data); + +int read_raw_ref(const char *refname, unsigned char *sha1, + struct strbuf *symref, unsigned int *flags); + #endif /* REFS_REFS_INTERNAL_H */ |