- 04 Apr, 2011 3 commits
-
-
Make header and variable parse functions use their own buffers instead of giving them the line they need to read as a parameter which they mostly ignore. This is in preparation for multiline configuration variables. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
On error, the buffer containing the file contents also needs to be freed. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed
-
- 31 Mar, 2011 7 commits
-
-
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
A variable name is stored internally with its section the way it appeared in the configuration file in order to have the information about what parts are case-sensitive inline. Really implement parse_section_header_ext and move the assignment of variables to config_parse. The variable name matching is now done in a case-away way by cvar_name_match and cvar_section_match. Before the user sees it, it's normalized to the two- or three-dot version. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
As parts of variable names are case-sensitive, we need these functions. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed
-
- 30 Mar, 2011 7 commits
-
-
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Such a list preserves the order the variables were first read in which will be useful later for merging different data-sets. Furthermore, reading and writing out the same configuration should not reorganize the variables, which could happen when iterating through all the items in a hash table. A hash table is overkill for this small a data-set anyway. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Store the key-value pair as strings. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
git_config_open shouldn't have to initialise variables that are only used inside config_parse and its callees. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Config variables should be interpreted at run-time, as we don't know if a zero means false or zero, or if yes means true or "yes". As a variable has no intrinsic type, git_cvtype is gone and the public API takes care of enforcing a few rules. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed
-
- 29 Mar, 2011 22 commits
-
-
Olivier Ramonat committed
-
res/dummy/a and refs/stash must pass. The other rules are already tested by the rest of the checks. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Allow any well-formed reference name to live under refs/ removing the condition that they be under refs/{heads,tags,remotes}/ as was the design of git. An exception is made for HEAD which is allowed to contain an OID reference in detached HEAD state. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Vicent Marti committed
-
Internal methods are static and without the git prefix. 'Force' methods have a `_f` prefix to match the other 'force' methods.
Vicent Marti committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Add internal reference create and rename functions which take a force parameter, telling them to overwrite an existing reference if it exists. These functions try to update the reference if it's of the same type as the one it's going to be replaced by. Otherwise the old reference becomes invalid. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
These functions can be used to query or modify the variables in a given configuration. No sanity checking is done on the variable names. This is mostly meant as an API preview. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Include it in src/config.h and fix the header name #define. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
The hashes have been copied from the references code Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed
-
- 28 Mar, 2011 1 commit
-
-
Apologies for the massive changes in the external API (that's my fault), and for the terrible codename for this release (that's @tclem's fault). The detailed overview for the major API changes can be found in the commit at 72a3fe42. Major new features in this release: - Real caching and refcounting on parsed objects - Real caching and refcounting on objects read from the ODB - Streaming writes & reads from the ODB - Single-method writes for all object types - The external API is now partially thread-safe - Improved reference handling - New method to list references - ZLib is now built-in - Improvements to the Revision Walker - Tons of bug fixes Thanks to all the contributors who make this possible. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Vicent Marti committed
-