Thread (45 messages) 45 messages, 8 authors, 2018-06-06
STALE2970d
Revisions (2)
  1. rfc current
  2. v1 [diff vs current]

[RFC PATCH 1/2] config.c: use braces on multiple conditional arms

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2018-06-06 10:27:36
Subsystem: the rest · Maintainer: Linus Torvalds

Adjust this code that'll be modified in a subsequent change per the
CodingGuidelines.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index fbbf0f8e9f..12f762ad92 100644
--- a/config.c
+++ b/config.c
@@ -1149,9 +1149,9 @@ static int git_default_core_config(const char *var, const char *value)
 	if (!strcmp(var, "core.abbrev")) {
 		if (!value)
 			return config_error_nonbool(var);
-		if (!strcasecmp(value, "auto"))
+		if (!strcasecmp(value, "auto")) {
 			default_abbrev = -1;
-		else {
+		} else {
 			int abbrev = git_config_int(var, value);
 			if (abbrev < minimum_abbrev || abbrev > 40)
 				return error("abbrev length out of range: %d", abbrev);
-- 
2.17.0.290.gded63e768a
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help