From: Junio C Hamano Date: Mon, 11 May 2015 21:23:52 +0000 (-0700) Subject: Merge branch 'jn/clean-use-error-not-fprintf-on-stderr' X-Git-Tag: v2.5.0-rc0~128 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a0c0c2e5c29f54c69fa6735aca6ed3079f5f4190?ds=inline;hp=-c 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, ...) --- a0c0c2e5c29f54c69fa6735aca6ed3079f5f4190 diff --combined builtin/config.c index bfd3016e83,89f32088f7..28f57c8fb9 --- a/builtin/config.c +++ b/builtin/config.c @@@ -193,7 -193,7 +193,7 @@@ static int get_value(const char *key_, 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 +214,7 @@@ 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; @@@ -455,9 -455,9 +455,9 @@@ static char *default_user_config(void struct strbuf buf = STRBUF_INIT; strbuf_addf(&buf, _("# This is Git's per-user configuration file.\n" - "[core]\n" + "[user]\n" "# Please adapt and uncomment the following lines:\n" - "# user = %s\n" + "# name = %s\n" "# email = %s\n"), ident_default_name(), ident_default_email());