summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/config.c b/config.c
index d349d52f26..68a2f939ef 100644
--- a/config.c
+++ b/config.c
@@ -2221,9 +2221,13 @@ void git_config_set_multivar_in_file(const char *config_filename,
const char *key, const char *value,
const char *value_regex, int multi_replace)
{
- if (git_config_set_multivar_in_file_gently(config_filename, key, value,
- value_regex, multi_replace))
+ if (!git_config_set_multivar_in_file_gently(config_filename, key, value,
+ value_regex, multi_replace))
+ return;
+ if (value)
die(_("could not set '%s' to '%s'"), key, value);
+ else
+ die(_("could not unset '%s'"), key);
}
int git_config_set_multivar_gently(const char *key, const char *value,