#include "object.h"
#include "tag.h"
+/*
+ * List of all available backends
+ */
+static struct ref_storage_be *refs_backends = &refs_be_files;
+
+static struct ref_storage_be *find_ref_storage_backend(const char *name)
+{
+ struct ref_storage_be *be;
+ for (be = refs_backends; be; be = be->next)
+ if (!strcmp(be->name, name))
+ return be;
+ return NULL;
+}
+
+int ref_storage_backend_exists(const char *name)
+{
+ return find_ref_storage_backend(name) != NULL;
+}
+
/*
* How to handle various characters in refnames:
* 0: An acceptable character for refs
reflog_expiry_cleanup_fn cleanup_fn,
void *policy_cb_data);
+int ref_storage_backend_exists(const char *name);
+
#endif /* REFS_H */
int read_raw_ref(const char *refname, unsigned char *sha1,
struct strbuf *referent, unsigned int *type);
+/* refs backends */
+struct ref_storage_be {
+ struct ref_storage_be *next;
+ const char *name;
+};
+
+extern struct ref_storage_be refs_be_files;
+
#endif /* REFS_REFS_INTERNAL_H */