From 30249ee68fa5fa63bfb9bb417987b0547253b8e7 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Tue, 17 Jan 2012 06:50:33 +0100 Subject: add_packed_ref(): new function in the refs API. Add a new function add_packed_ref() that adds a reference directly to the in-memory packed reference cache. This will be useful for creating local references while cloning. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- refs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'refs.h') diff --git a/refs.h b/refs.h index d4982915c5..00ba1e2813 100644 --- a/refs.h +++ b/refs.h @@ -50,6 +50,12 @@ extern int for_each_rawref(each_ref_fn, void *); extern void warn_dangling_symref(FILE *fp, const char *msg_fmt, const char *refname); +/* + * Add a reference to the in-memory packed reference cache. To actually + * write the reference to the packed-refs file, call pack_refs(). + */ +extern void add_packed_ref(const char *refname, const unsigned char *sha1); + /* * Extra refs will be listed by for_each_ref() before any actual refs * for the duration of this process or until clear_extra_refs() is -- cgit v1.3-5-g9baa