Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2010-12-27 22:34:19 +0300
committerVicent Marti <tanoku@gmail.com>2011-01-29 04:39:02 +0300
commit9282e921a394d422188ee43e18a63d418f88ac95 (patch)
treea26eb65e2b9a3b0ce7f35c7fa47e560c646f418d /src/repository.h
parentf2c2471389048b8f930ed945ed1acfe004f901a4 (diff)
Merge nulltoken's reference parsing code
All the commits have been squashed into a single one before refactoring the final code, to keep everything tidy. Individual commit messages are as follows: Added repository reference looking up functionality placeholder. Added basic reference database definition and caching infrastructure. Removed useless constant. Added GIT_EINVALIDREFNAME error and description. Added missing description for GIT_EBAREINDEX. Added GIT_EREFCORRUPTED error and description. Added GIT_ETOONESTEDSYMREF error and description. Added resolving of direct and symbolic references. Prepared the packed-refs parsing. Added parsing of the packed-refs file content. When no loose reference has been found, the full content of the packed-refs file is parsed. All of the new (i.e. not previously parsed as a loose reference) references are eagerly stored in the cached references storage. The method packed_reference_file__parse() is in deer need of some refactoring. :-) Extracted to a method the parsing of the peeled target of a tag. Extracted to a method the parsing of a standard packed ref. Fixed leaky removal of the cached references. Ensured that a previously parsed packed reference isn't returned if a more up-to-date loose reference exists. Enhanced documentation of git_repository_reference_lookup(). Moved some refs related constants from repository.c to refs.h. Made parsing of a packed tag reference more robust. Updated git_repository_reference_lookup() documentation. Added some references to the test repository. Added some tests covering tag references looking up. Added some tests covering symbolic and head references looking up. Added some tests covering packed references looking up.
Diffstat (limited to 'src/repository.h')
-rw-r--r--src/repository.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/repository.h b/src/repository.h
index 44b37e1d0..1e9e0a5b9 100644
--- a/src/repository.h
+++ b/src/repository.h
@@ -8,6 +8,7 @@
#include "hashtable.h"
#include "index.h"
+#include "refs.h"
typedef struct {
git_rawobj raw;
@@ -27,6 +28,7 @@ struct git_repository {
git_odb *db;
git_index *index;
git_hashtable *objects;
+ git_reference_database *ref_database;
char *path_repository;
char *path_index;