diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2016-09-04 18:08:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-09 15:28:12 -0700 |
commit | 34c7ad8ffc79c64d7f2261e6bcf6efd3adb16e7e (patch) | |
tree | 0840253cc0d710b741245c4b6f4223a799329161 /refs.c | |
parent | b9180c9d5d13366e228130eb0d2f1451f2e4dfd6 (diff) | |
download | git-34c7ad8ffc79c64d7f2261e6bcf6efd3adb16e7e.tar.gz |
read_raw_ref(): take a (struct ref_store *) argument
And make the function work for submodules.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1222,6 +1222,7 @@ const char *resolve_ref_unsafe(const char *refname, int resolve_flags, static struct strbuf sb_refname = STRBUF_INIT; int unused_flags; int symref_count; + struct ref_store *refs = get_ref_store(NULL); if (!flags) flags = &unused_flags; @@ -1249,7 +1250,8 @@ const char *resolve_ref_unsafe(const char *refname, int resolve_flags, for (symref_count = 0; symref_count < SYMREF_MAXDEPTH; symref_count++) { unsigned int read_flags = 0; - if (read_raw_ref(refname, sha1, &sb_refname, &read_flags)) { + if (read_raw_ref(refs, refname, + sha1, &sb_refname, &read_flags)) { *flags |= read_flags; if (errno != ENOENT || (resolve_flags & RESOLVE_REF_READING)) return NULL; |