summaryrefslogtreecommitdiff
path: root/src/refs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/refs.h')
-rw-r--r--src/refs.h40
1 files changed, 16 insertions, 24 deletions
diff --git a/src/refs.h b/src/refs.h
index 3cfd46d58..f19d87894 100644
--- a/src/refs.h
+++ b/src/refs.h
@@ -9,40 +9,32 @@
#define GIT_REFS_HEADS_DIR GIT_REFS_DIR "heads/"
#define GIT_REFS_TAGS_DIR GIT_REFS_DIR "tags/"
-#define GIT_SYMREF "ref:"
+#define GIT_SYMREF "ref: "
#define GIT_PACKEDREFS_FILE "packed-refs"
#define GIT_PACKEDREFS_HEADER "# pack-refs with: peeled \n"
#define MAX_GITDIR_TREE_STRUCTURE_PATH_LENGTH 100
struct git_reference {
+ git_repository *owner;
git_rtype type;
char *name;
- unsigned is_packed:1;
-};
-
-struct git_reference_object_id {
- git_reference base;
+ unsigned packed:1,
+ modified:1;
- git_oid id;
+ union {
+ char *ref;
+ git_oid oid;
+ } target;
};
-struct git_reference_symbolic {
- git_reference base;
+typedef struct {
+ git_hashtable *cache;
+ unsigned pack_loaded:1;
+} git_refcache;
+
- git_reference *target;
-};
+void git_repository__refcache_free(git_refcache *refs);
+int git_repository__refcache_init(git_refcache *refs);
-typedef struct {
- git_hashtable *references;
-
- unsigned is_fully_loaded:1;
- unsigned have_packed_refs_been_parsed:1;
- unsigned is_busy:1;
-} git_reference_database;
-
-git_reference_database *git_reference_database__alloc();
-void git_reference_database__free(git_reference_database *ref_database);
-int git_reference_lookup(git_reference **reference_out, git_reference_database *ref_database, const char *name, const char *path_repository, int *nesting_level);
-
-#endif \ No newline at end of file
+#endif