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:
David Turner
2016-09-04 18:08:41 +02:00
committed by Junio C Hamano
parent a27dcf89b6
commit 6fb5acfd8f
5 changed files with 42 additions and 10 deletions

2
refs.h
View File

@ -66,6 +66,8 @@ int ref_exists(const char *refname);
int is_branch(const char *refname);
extern int refs_init_db(struct strbuf *err);
/*
* If refname is a non-symbolic reference that refers to a tag object,
* and the tag can be (recursively) dereferenced to a non-tag object,