Hash :
9282e921
Author :
Date :
2010-12-27T20:34:19
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.
Test sources should be named:
t????-function.c
where ???? is a four digit code. The first two digits classify
the test into a major category; the final two digits indicate the
sequence of the test within that category. The function part of
the test name should give a rough indication of what it does.
Categories
----------
00__: Core library routines based only on the standard library,
and that are essential for everything else to run. E.g.
errno and malloc.
01__: Basic hashing functions, needed to handle the content
addressable store.
02__: Basic object read access.
03__: Basic object writing.
04__: Parsing and loading commit data
05__: To be described
06__: To be described
07__: To be described
08__: To be described
09__: To be described
10__: Symbolic, loose and packed references reading and writing.