diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-02-18 21:57:53 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-03-03 20:23:49 +0200 |
commit | 86194b2433b993666bb58e7818f5b1f4133c9a43 (patch) | |
tree | c7165ed2c8d7f3bc291f49ef2d815ec29b24ac30 /src/refs.h | |
parent | 32054c24a26ab386fb56c7333fa723459e7e8dff (diff) | |
download | libgit2-86194b2433b993666bb58e7818f5b1f4133c9a43.tar.gz |
Split packed from unpacked references
These two reference types are now stored separately to eventually allow
the removal/renaming of loose references and rewriting of the refs
packfile.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/refs.h')
-rw-r--r-- | src/refs.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/refs.h b/src/refs.h index 33bedc4b7..5fc71fc83 100644 --- a/src/refs.h +++ b/src/refs.h @@ -18,25 +18,22 @@ struct git_reference { git_repository *owner; - git_rtype type; char *name; - - unsigned packed:1; - - union { - char *ref; - git_oid oid; - } target; + unsigned int type; }; typedef struct { - git_hashtable *cache; + git_hashtable *packed_refs; + git_hashtable *loose_refs; + unsigned pack_loaded:1; } git_refcache; void git_repository__refcache_free(git_refcache *refs); int git_repository__refcache_init(git_refcache *refs); -int git_reference__normalize_name(char *buffer_out, const char *name, git_rtype type); + +int git_reference__normalize_name(char *buffer_out, const char *name); +int git_reference__normalize_name_oid(char *buffer_out, const char *name); #endif |