diff options
| author | Vicent Marti <tanoku@gmail.com> | 2013-11-01 17:25:32 +0100 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2013-11-01 17:25:32 +0100 |
| commit | 653ec420f9db9924e669a749d7c4e226f824a1d2 (patch) | |
| tree | d908db20abefa16069c96906f3137180de9ef288 /include | |
| parent | ab44c62e548373c1494e967f54720faa06ce38b7 (diff) | |
| parent | 376454d03dbb0c78b1266a85b29ec8bf48930a4d (diff) | |
| download | libgit2-653ec420f9db9924e669a749d7c4e226f824a1d2.tar.gz | |
Merge remote-tracking branch 'drodriguez/fix-remote-save' into development
Diffstat (limited to 'include')
| -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 *); |
