summaryrefslogtreecommitdiff
path: root/refs/refs-internal.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-22 17:29:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-22 17:29:16 (GMT)
commit44c2339e55df11b2cfd8bdc28ceee6b4d1ca1928 (patch)
treeff70450766cafb4ba09e6973df9956c0bff80eee /refs/refs-internal.h
parenta080a5ce8d9f6897668bb36cb1891f70d685b6c3 (diff)
parent8ec617c80cc37dcd66821f89678fc8797af96f10 (diff)
downloadgit-44c2339e55df11b2cfd8bdc28ceee6b4d1ca1928.zip
git-44c2339e55df11b2cfd8bdc28ceee6b4d1ca1928.tar.gz
git-44c2339e55df11b2cfd8bdc28ceee6b4d1ca1928.tar.bz2
Merge branch 'mh/packed-ref-store'
The "ref-store" code reorganization continues. * mh/packed-ref-store: (32 commits) files-backend: cheapen refname_available check when locking refs packed_ref_store: handle a packed-refs file that is a symlink read_packed_refs(): die if `packed-refs` contains bogus data t3210: add some tests of bogus packed-refs file contents repack_without_refs(): don't lock or unlock the packed refs commit_packed_refs(): remove call to `packed_refs_unlock()` clear_packed_ref_cache(): don't protest if the lock is held packed_refs_unlock(), packed_refs_is_locked(): new functions packed_refs_lock(): report errors via a `struct strbuf *err` packed_refs_lock(): function renamed from lock_packed_refs() commit_packed_refs(): use a staging file separate from the lockfile commit_packed_refs(): report errors rather than dying packed_ref_store: make class into a subclass of `ref_store` packed-backend: new module for handling packed references packed_read_raw_ref(): new function, replacing `resolve_packed_ref()` packed_ref_store: support iteration packed_peel_ref(): new function, extracted from `files_peel_ref()` repack_without_refs(): take a `packed_ref_store *` parameter get_packed_ref(): take a `packed_ref_store *` parameter rollback_packed_refs(): take a `packed_ref_store *` parameter ...
Diffstat (limited to 'refs/refs-internal.h')
-rw-r--r--refs/refs-internal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 192f9f8..4789106 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -77,6 +77,15 @@
*/
int refname_is_safe(const char *refname);
+/*
+ * Helper function: return true if refname, which has the specified
+ * oid and flags, can be resolved to an object in the database. If the
+ * referred-to object does not exist, emit a warning and return false.
+ */
+int ref_resolves_to_object(const char *refname,
+ const struct object_id *oid,
+ unsigned int flags);
+
enum peel_status {
/* object was peeled successfully: */
PEEL_PEELED = 0,
@@ -655,6 +664,7 @@ struct ref_storage_be {
};
extern struct ref_storage_be refs_be_files;
+extern struct ref_storage_be refs_be_packed;
/*
* A representation of the reference store for the main repository or