refs: add methods to init refs db
Alternate refs backends might not need the refs/heads directory and so on, so we make ref db initialization part of the backend. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
a27dcf89b6
commit
6fb5acfd8f
8
refs.c
8
refs.c
@ -1292,6 +1292,14 @@ static const char *resolve_ref_recursively(struct ref_store *refs,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* backend functions */
|
||||
int refs_init_db(struct strbuf *err)
|
||||
{
|
||||
struct ref_store *refs = get_ref_store(NULL);
|
||||
|
||||
return refs->be->init_db(refs, err);
|
||||
}
|
||||
|
||||
const char *resolve_ref_unsafe(const char *refname, int resolve_flags,
|
||||
unsigned char *sha1, int *flags)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user