summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2016-09-04 18:08:29 +0200
committerJunio C Hamano <gitster@pobox.com>2016-09-09 15:28:13 -0700
commitbd427cf27f561174fa8fa14e2c8c321d2df82c47 (patch)
treeff7ea5006c12bd3ddecc0fd217eb7c8fec627e44 /refs.c
parent284689ba0ff7506d581bcee7481a2621492135ef (diff)
downloadgit-bd427cf27f561174fa8fa14e2c8c321d2df82c47.tar.gz
refs: make peel_ref() virtual
For now it only supports the main reference store. 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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index 312c76619f..3130c0e019 100644
--- a/refs.c
+++ b/refs.c
@@ -1428,6 +1428,13 @@ int pack_refs(unsigned int flags)
return refs->be->pack_refs(refs, flags);
}
+int peel_ref(const char *refname, unsigned char *sha1)
+{
+ struct ref_store *refs = get_ref_store(NULL);
+
+ return refs->be->peel_ref(refs, refname, sha1);
+}
+
int create_symref(const char *ref_target, const char *refs_heads_master,
const char *logmsg)
{