Thread (25 messages) flat view 25 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH 02/20] gettextize: git-clone "Cloning into" message braces

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:30
Subsystem: the rest · Maintainer: Linus Torvalds

Use braces around a nested if/if/else to appease GCC, which'll whine
under -Wall and "suggest explicit braces to avoid ambiguous ‘else’".

This code was originally added in "gettextize: git-clone "Cloning
into" message", and tested under clang (which doesn't whine about
perfectly valid uses of C).

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 builtin/clone.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index 7b0d104..1f10f3f 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -465,11 +465,12 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 		die(_("could not create leading directories of '%s'"), git_dir);
 	set_git_dir(make_absolute_path(git_dir));
 
-	if (0 <= option_verbosity)
+	if (0 <= option_verbosity) {
 		if (option_bare)
 			printf(_("Cloning into bare repository %s"), dir);
 		else
 			printf(_("Cloning into %s"), dir);
+	}
 	init_db(option_template, INIT_DB_QUIET);
 
 	/*
-- 
1.7.2.3.313.gcd15
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help