summaryrefslogtreecommitdiff
path: root/src/repository.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-04-22 14:24:12 -0700
committerRussell Belfer <rb@github.com>2013-04-23 12:57:30 -0700
commitab01cbd4ddd756c7beda3f483791cb5d4e211872 (patch)
treeb599369694a135a1350c906bdd90fd6088d93f7d /src/repository.h
parent608d04667ae08e991c1ffa6f33573d15930245b3 (diff)
downloadlibgit2-ab01cbd4ddd756c7beda3f483791cb5d4e211872.tar.gz
Add configs to repo config cache
This adds a bunch of additional config values to the repository config value cache and makes it easier to add a simple boolean config without creating enum values for each possible setting. Also, this fixes a bug in git_config_refresh where the config cache was not being cleared which could lead to potential incorrect values. The work to start using the new cached configs will come in the next couple of commits...
Diffstat (limited to 'src/repository.h')
-rw-r--r--src/repository.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/repository.h b/src/repository.h
index cc2f8c2b8..f7f9ecb1f 100644
--- a/src/repository.h
+++ b/src/repository.h
@@ -12,6 +12,7 @@
#include "git2/odb.h"
#include "git2/repository.h"
#include "git2/object.h"
+#include "git2/config.h"
#include "index.h"
#include "cache.h"
@@ -31,7 +32,13 @@
/** Cvar cache identifiers */
typedef enum {
GIT_CVAR_AUTO_CRLF = 0, /* core.autocrlf */
- GIT_CVAR_EOL, /* core.eol */
+ GIT_CVAR_EOL, /* core.eol */
+ GIT_CVAR_SYMLINKS, /* core.symlinks */
+ GIT_CVAR_IGNORECASE, /* core.ignorecase */
+ GIT_CVAR_FILEMODE, /* core.filemode */
+ GIT_CVAR_IGNORESTAT, /* core.ignorestat */
+ GIT_CVAR_TRUSTCTIME, /* core.trustctime */
+ GIT_CVAR_ABBREV, /* core.abbrev */
GIT_CVAR_CACHE_MAX
} git_cvar_cached;
@@ -67,7 +74,21 @@ typedef enum {
#else
GIT_EOL_NATIVE = GIT_EOL_LF,
#endif
- GIT_EOL_DEFAULT = GIT_EOL_NATIVE
+ GIT_EOL_DEFAULT = GIT_EOL_NATIVE,
+
+ /* core.symlinks: bool */
+ GIT_SYMLINKS_DEFAULT = GIT_CVAR_TRUE,
+ /* core.ignorecase */
+ GIT_IGNORECASE_DEFAULT = GIT_CVAR_FALSE,
+ /* core.filemode */
+ GIT_FILEMODE_DEFAULT = GIT_CVAR_TRUE,
+ /* core.ignorestat */
+ GIT_IGNORESTAT_DEFAULT = GIT_CVAR_FALSE,
+ /* core.trustctime */
+ GIT_TRUSTCTIME_DEFAULT = GIT_CVAR_TRUE,
+ /* core.abbrev */
+ GIT_ABBREV_DEFAULT = 7,
+
} git_cvar_value;
/* internal repository init flags */