Commit Graph

20 Commits

Author SHA1 Message Date
Vicent Marti
bb742ede3d Cleanup legal data
1. The license header is technically not valid if it doesn't have a
copyright signature.

2. The COPYING file has been updated with the different licenses used in
the project.

3. The full GPLv2 header in each file annoys me.
2011-09-19 01:54:32 +03:00
David Boyce
d911172255 Standardized doxygen @return lines for int functions to say "GIT_SUCCESS or an error code". 2011-09-13 12:30:25 -04:00
Vicent Marti
b08683ffb2 config: Rename del to `delete 2011-07-12 02:38:20 +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
e0fc39da9a config: Fix unmatched parameters in docs 2011-06-30 22:28:19 +02:00
Vicent Marti
cfef5fb779 config: foreach now returns variable values too 2011-06-29 15:09:21 +02:00
Vicent Marti
bfd5e3e2a2 config: Fix API docs 2011-06-19 12:50:45 +02:00
Vicent Marti
19cb6857a4 config: Bring back git_config_open_global
Scott commands, I obey.
2011-06-18 01:50:48 +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
Vicent Marti
d144c569f3 Update documentation
Fix all the missmatched arguments in the docs
2011-06-16 03:06:22 +02:00
Carlos Martín Nieto
a2a305fcf4 config: explain the cfg and file relationship better
It's not clear how git_config and git_config_file relate to one
another. Be more explicit about their relationship in the function
documentation.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-07 15:39:40 +02:00
Carlos Martín Nieto
ce78f39e27 config: update the git_config_add_file documentation
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-07 14:18:22 +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
Carlos Martín Nieto
f44cbec479 Add documentation for git_config_add_backend 2011-05-17 14:59:23 +02:00
Carlos Martín Nieto
32234541f6 Implement git_config_open_global
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-05-17 14:31:57 +02: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
e69ac2439f config: export git_config_[sg]et_long
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-04-19 16:38:55 +02:00
Carlos Martín Nieto
2974aa94c3 Determine variable type at runtime
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>
2011-03-30 13:42:24 +02:00
Carlos Martín Nieto
9a3c5e55fd Expose config API for setters, getters and foreach
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>
2011-03-29 18:13:47 +02:00
Carlos Martín Nieto
5d4cd00305 Move the struct declaration outside config.c
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-03-28 17:03:08 +02:00