summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-25 20:38:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-05-25 20:41:37 (GMT)
commitb84c343c885b8168047b2773b5c597d04337d9bd (patch)
treea4ef0ee1fd0939d2a465d794ba0d88fc54234d28 /refs.h
parent0dbaa5bd514b9d234c07fd6b857888566abcf836 (diff)
parentb50c8469cc9a336b22ef37b23711d4547a48bc2b (diff)
downloadgit-b84c343c885b8168047b2773b5c597d04337d9bd.zip
git-b84c343c885b8168047b2773b5c597d04337d9bd.tar.gz
git-b84c343c885b8168047b2773b5c597d04337d9bd.tar.bz2
Merge branch 'db/clone-in-c'
* db/clone-in-c: Add test for cloning with "--reference" repo being a subset of source repo Add a test for another combination of --reference Test that --reference actually suppresses fetching referenced objects clone: fall back to copying if hardlinking fails builtin-clone.c: Need to closedir() in copy_or_link_directory() builtin-clone: fix initial checkout Build in clone Provide API access to init_db() Add a function to set a non-default work tree Allow for having for_each_ref() list extra refs Have a constant extern refspec for "--tags" Add a library function to add an alternate to the alternates file Add a lockfile function to append to a file Mark the list of refs to fetch as const Conflicts: cache.h t/t5700-clone-reference.sh
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 06abee1..06ad260 100644
--- a/refs.h
+++ b/refs.h
@@ -24,6 +24,15 @@ extern int for_each_tag_ref(each_ref_fn, void *);
extern int for_each_branch_ref(each_ref_fn, void *);
extern int for_each_remote_ref(each_ref_fn, void *);
+/*
+ * 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
+ * called. Only extra refs added before for_each_ref() is called will
+ * be listed on a given call of for_each_ref().
+ */
+extern void add_extra_ref(const char *refname, const unsigned char *sha1, int flags);
+extern void clear_extra_refs(void);
+
extern int peel_ref(const char *, unsigned char *);
/** Locks a "refs/" ref returning the lock on success and NULL on failure. **/