Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-03-23 12:13:03 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-23 21:38:38 +0300
commit82e69b0cb5efff33f9359aa0141b05c93001157e (patch)
treea7f8963f37a1e01c3ee2c5713c3c5ec4a57a2c60 /builtin/ls-tree.c
parent4e4566f67e9433b7b0f475c4f16e1fe77fb527f4 (diff)
ls-tree: add missing braces to "else" arms
Add missing {} to the "else" arms in show_tree() per the CodingGuidelines. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/ls-tree.c')
-rw-r--r--builtin/ls-tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
index 5f7c84950c..0a28f32ccb 100644
--- a/builtin/ls-tree.c
+++ b/builtin/ls-tree.c
@@ -92,14 +92,16 @@ static int show_tree(const struct object_id *oid, struct strbuf *base,
else
xsnprintf(size_text, sizeof(size_text),
"%"PRIuMAX, (uintmax_t)size);
- } else
+ } else {
xsnprintf(size_text, sizeof(size_text), "-");
+ }
printf("%06o %s %s %7s\t", mode, type,
find_unique_abbrev(oid, abbrev),
size_text);
- } else
+ } else {
printf("%06o %s %s\t", mode, type,
find_unique_abbrev(oid, abbrev));
+ }
}
baselen = base->len;
strbuf_addstr(base, pathname);