summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-11 21:23:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-05-11 21:23:53 (GMT)
commita0c0c2e5c29f54c69fa6735aca6ed3079f5f4190 (patch)
treecf97c7a2ddad14d59071155d628622f15f0cc803 /builtin
parent5fa9e4c4f1582cbfdd652edac36bb76434ffb629 (diff)
parent95d621217a386b821d606168f986c89254584a87 (diff)
downloadgit-a0c0c2e5c29f54c69fa6735aca6ed3079f5f4190.zip
git-a0c0c2e5c29f54c69fa6735aca6ed3079f5f4190.tar.gz
git-a0c0c2e5c29f54c69fa6735aca6ed3079f5f4190.tar.bz2
Merge branch 'jn/clean-use-error-not-fprintf-on-stderr'
Some error messages in "git config" were emitted without calling the usual error() facility. * jn/clean-use-error-not-fprintf-on-stderr: config: use error() instead of fprintf(stderr, ...)
Diffstat (limited to 'builtin')
-rw-r--r--builtin/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/config.c b/builtin/config.c
index bfd3016..28f57c8 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -193,7 +193,7 @@ static int get_value(const char *key_, const char *regex_)
key_regexp = (regex_t*)xmalloc(sizeof(regex_t));
if (regcomp(key_regexp, key, REG_EXTENDED)) {
- fprintf(stderr, "Invalid key pattern: %s\n", key_);
+ error("invalid key pattern: %s", key_);
free(key_regexp);
key_regexp = NULL;
ret = CONFIG_INVALID_PATTERN;
@@ -214,7 +214,7 @@ static int get_value(const char *key_, const char *regex_)
regexp = (regex_t*)xmalloc(sizeof(regex_t));
if (regcomp(regexp, regex_, REG_EXTENDED)) {
- fprintf(stderr, "Invalid pattern: %s\n", regex_);
+ error("invalid pattern: %s", regex_);
free(regexp);
regexp = NULL;
ret = CONFIG_INVALID_PATTERN;