diff options
| author | Patrick Steinhardt <ps@pks.im> | 2018-02-09 11:35:16 +0000 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2018-03-26 10:15:16 +0100 |
| commit | 26cf48fcf8cf0ecd2b098a41c8873a75e0186577 (patch) | |
| tree | a4c25bcb552fe8acae616db6565f50c92b44e275 /include/git2 | |
| parent | fcb0d841e77b6a7fdfe273c82aaa6568c387d054 (diff) | |
| download | libgit2-26cf48fcf8cf0ecd2b098a41c8873a75e0186577.tar.gz | |
config_file: move include depth into config entry
In order to reject writes to included configuration entries, we need to
keep track of whether an entry was included via another configuration
file or not. This information is being stored in the `cvar` structure,
which is a rather weird location, as it is only used to create a list
structure of config entries.
Move the include depth into the structure `git_config_entry` instead.
While this fixes the layering issue, it enables users of libgit2 to
access the depth, too.
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/config.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index d9da65b84..7bcca7da2 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -64,6 +64,7 @@ typedef enum { typedef struct git_config_entry { const char *name; /**< Name of the entry (normalised) */ const char *value; /**< String value of the entry */ + unsigned int include_depth; /**< Depth of includes where this variable was found */ git_config_level_t level; /**< Which config file this was found in */ void (*free)(struct git_config_entry *entry); /**< Free function for this entry */ void *payload; /**< Opaque value for the free function. Do not read or write */ |
