Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Fixed a translation error

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:04:38

Jonathan Nieder [off-list ref] writes:
While we're here, start the error messages with a lowercase letter to
match the usual typography of error messages.

A quick web search and a code search at codesearch.debian.net finds no
scripts trying to parse these error messages, so this change should be
safe.
Very well thought through and nicely written.

I am tempted to pick this patch up and queue it on its own.  Alengi,
if you want to add _() markings to this file, perhaps it is a good
idea to base your patch relative to (i.e. on top of) Jonathan's
patch.

Thanks.
quoted hunk
Signed-off-by: Jonathan Nieder <redacted>
---
 builtin/config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/config.c b/builtin/config.c
index d32c532..89f3208 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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help