aboutsummaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-19 13:47:19 -0700
committerJunio C Hamano <gitster@pobox.com>2016-09-19 13:47:19 -0700
commit4322f3848a224843a2df81055f07899ce1a1b388 (patch)
tree08f4c288ee794c855a11096464e9087efd33a68f /refs.h
parent81358dc238372793b1590efa149cc1581d1fbd98 (diff)
parent0c09ec07d1e617be5f2d7b5c937b60e77a30ede2 (diff)
downloadgit-4322f3848a224843a2df81055f07899ce1a1b388.tar.gz
git-4322f3848a224843a2df81055f07899ce1a1b388.tar.xz
Merge branch 'mh/ref-store'
The ref-store abstraction was introduced to the refs API so that we can plug in different backends to store references. * mh/ref-store: (38 commits) refs: implement iteration over only per-worktree refs refs: make lock generic refs: add method to rename refs refs: add methods to init refs db refs: make delete_refs() virtual refs: add method for initial ref transaction commit refs: add methods for reflog refs: add method iterator_begin files_ref_iterator_begin(): take a ref_store argument split_symref_update(): add a files_ref_store argument lock_ref_sha1_basic(): add a files_ref_store argument lock_ref_for_update(): add a files_ref_store argument commit_ref_update(): add a files_ref_store argument lock_raw_ref(): add a files_ref_store argument repack_without_refs(): add a files_ref_store argument refs: make peel_ref() virtual refs: make create_symref() virtual refs: make pack_refs() virtual refs: make verify_refname_available() virtual refs: make read_raw_ref() virtual ...
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/refs.h b/refs.h
index 1b0204375..d42458c8c 100644
--- a/refs.h
+++ b/refs.h
@@ -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,
@@ -77,11 +79,12 @@ int is_branch(const char *refname);
int peel_ref(const char *refname, unsigned char *sha1);
/**
- * Resolve refname in the nested "gitlink" repository that is located
- * at path. If the resolution is successful, return 0 and set sha1 to
- * the name of the object; otherwise, return a non-zero value.
+ * Resolve refname in the nested "gitlink" repository in the specified
+ * submodule (which must be non-NULL). If the resolution is
+ * successful, return 0 and set sha1 to the name of the object;
+ * otherwise, return a non-zero value.
*/
-int resolve_gitlink_ref(const char *path, const char *refname,
+int resolve_gitlink_ref(const char *submodule, const char *refname,
unsigned char *sha1);
/*
@@ -544,4 +547,6 @@ int reflog_expire(const char *refname, const unsigned char *sha1,
reflog_expiry_cleanup_fn cleanup_fn,
void *policy_cb_data);
+int ref_storage_backend_exists(const char *name);
+
#endif /* REFS_H */