Carlos Martín Nieto
7d69f78897
Add variable writing tests
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-07-05 02:32:18 +02:00
Carlos Martín Nieto
156af801e6
Add test for section header at end of file
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-07-05 02:32:18 +02:00
Carlos Martín Nieto
2601fcfc1e
Add tests for deleting a config var
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-07-05 02:32:17 +02:00
Vicent Marti
2a406ab51c
config: Fix sorting of repository config files
2011-06-18 02:08:56 +02:00
Vicent Marti
dbe70bd5c3
config: Fix compilation in MSVC
2011-06-18 01:12:58 +02:00
Vicent Marti
07ff881750
config: Cleanup external API
...
Do not mess with environment variables anymore. The new external API has
more helper methods, and everything is explicit.
2011-06-18 00:39:39 +02:00
Carlos Martín Nieto
f3dad3acd7
Add fall-back support to the configuration
...
If a config has several files, we need to check all of them before we
can say that a variable doesn't exist.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:30 +02:00
Carlos Martín Nieto
3de5df7d8e
Add a test for overriding config
...
The repo's configuration should take precedence over the global one.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:29 +02:00
Carlos Martín Nieto
a98b0d80dc
Test replacing a value
...
Add a test to check that value replacement works.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-14 14:26:08 +02:00
Carlos Martín Nieto
fc0ee5bdd3
Add test for empty config file
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-05-31 17:57:18 +02:00
Carlos Martín Nieto
30d0550da8
Add test for invalid ext header
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-05-31 17:57:17 +02:00
Carlos Martín Nieto
38d0bc1e81
Add config test for empty line
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-05-31 17:57:17 +02:00
Vicent Marti
b0b527e0ad
config: Cleanup & renaming of the external API
...
"git_config_backend" have been renamed to "git_config_file", which
implements a generic interface to access a configuration file -- be it
either on disk, from a DB or whatever mumbojumbo.
I think this makes more sense.
2011-05-20 03:20:12 +03:00
Vicent Marti
c9662061f2
t15: Remove unused variable
2011-05-17 15:12:25 +03:00
Carlos Martín Nieto
c033500549
Move config to a backend structure
...
Configuration options can come from different sources. Currently,
there is only support for reading them from a flat file, but it might
make sense to read it from a database at some point.
Move the parsing code into src/config_file.c and create an include
file include/git2/config_backend.h to allow for other backends to be
developed.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-05-10 14:47:20 +02:00
Carlos Martín Nieto
a99264bff6
config: allow uppercase number suffixes
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-04-19 16:34:22 +02:00
Carlos Martín Nieto
53345e1f1f
config: add tests for number suffix
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-04-11 18:01:01 +02:00
Carlos Martín Nieto
55c197cdd3
Merge upstream/development
2011-04-11 17:43:56 +02:00