refs: split off reading loose ref data in separate function
This prepares for handling FETCH_HEAD (which is not a regular ref) separately from the ref backend. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
878e727637
commit
e39620f07e
@ -674,6 +674,12 @@ struct ref_store {
|
||||
const struct ref_storage_be *be;
|
||||
};
|
||||
|
||||
/*
|
||||
* Parse contents of a loose ref file.
|
||||
*/
|
||||
int parse_loose_ref_contents(const char *buf, struct object_id *oid,
|
||||
struct strbuf *referent, unsigned int *type);
|
||||
|
||||
/*
|
||||
* Fill in the generic part of refs and add it to our collection of
|
||||
* reference stores.
|
||||
|
Reference in New Issue
Block a user