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>
This commit is contained in:
Michael Haggerty
2016-09-04 18:08:29 +02:00
committed by Junio C Hamano
parent 284689ba0f
commit bd427cf27f
3 changed files with 14 additions and 2 deletions

7
refs.c
View File

@ -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)
{