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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <avarab@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]