diff options
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/config.h | 11 | ||||
| -rw-r--r-- | include/git2/sys/config.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index f14415148..95da4bc03 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -435,6 +435,17 @@ GIT_EXTERN(int) git_config_set_multivar(git_config *cfg, const char *name, const GIT_EXTERN(int) git_config_delete_entry(git_config *cfg, const char *name); /** + * Deletes one or several entries from a multivar in the local config file. + * + * @param cfg where to look for the variables + * @param name the variable's name + * @param regexp a regular expression to indicate which values to delete + * + * @return 0 or an error code + */ +GIT_EXTERN(int) git_config_delete_multivar(git_config *cfg, const char *name, const char *regexp); + +/** * Perform an operation on each config variable. * * The callback receives the normalized name and value of each variable diff --git a/include/git2/sys/config.h b/include/git2/sys/config.h index 7572ace51..419ad7ea7 100644 --- a/include/git2/sys/config.h +++ b/include/git2/sys/config.h @@ -61,6 +61,7 @@ struct git_config_backend { int (*set)(struct git_config_backend *, const char *key, const char *value); int (*set_multivar)(git_config_backend *cfg, const char *name, const char *regexp, const char *value); int (*del)(struct git_config_backend *, const char *key); + int (*del_multivar)(struct git_config_backend *, const char *key, const char *regexp); int (*iterator)(git_config_iterator **, struct git_config_backend *); int (*refresh)(struct git_config_backend *); void (*free)(struct git_config_backend *); |
