summaryrefslogtreecommitdiff
path: root/refs/refs-internal.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2016-09-04 18:08:20 +0200
committerJunio C Hamano <gitster@pobox.com>2016-09-09 15:28:12 -0700
commit34c7ad8ffc79c64d7f2261e6bcf6efd3adb16e7e (patch)
tree0840253cc0d710b741245c4b6f4223a799329161 /refs/refs-internal.h
parentb9180c9d5d13366e228130eb0d2f1451f2e4dfd6 (diff)
downloadgit-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/refs-internal.h')
-rw-r--r--refs/refs-internal.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index b7367ab4c1..fa41d510c2 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -484,9 +484,11 @@ extern struct ref_iterator *current_ref_iter;
int do_for_each_ref_iterator(struct ref_iterator *iter,
each_ref_fn fn, void *cb_data);
+struct ref_store;
+
/*
- * Read the specified reference from the filesystem or packed refs
- * file, non-recursively. Set type to describe the reference, and:
+ * Read a reference from the specified reference store, non-recursively.
+ * Set type to describe the reference, and:
*
* - If refname is the name of a normal reference, fill in sha1
* (leaving referent unchanged).
@@ -522,7 +524,8 @@ int do_for_each_ref_iterator(struct ref_iterator *iter,
* - in all other cases, referent will be untouched, and therefore
* refname will still be valid and unchanged.
*/
-int read_raw_ref(const char *refname, unsigned char *sha1,
+int read_raw_ref(struct ref_store *ref_store,
+ const char *refname, unsigned char *sha1,
struct strbuf *referent, unsigned int *type);
/* refs backends */