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>
Ævar Arnfjörð Bjarmason committed
Mar 23, 2022 at 17:13 UTC
82e69b0cb5efff33f9359aa0141b05c93001157e
1 file changed
+4
-2
builtin/ls-tree.c
+4
-2
@@ -92,14 +92,16 @@ static int show_tree(const struct object_id *oid, struct strbuf *base,
92
else
93
xsnprintf(size_text, sizeof(size_text),
94
"%"PRIuMAX, (uintmax_t)size);
95
- } else
95
+ } else {
96
xsnprintf(size_text, sizeof(size_text), "-");
97
+ }
98
printf("%06o %s %s %7s\t", mode, type,
99
find_unique_abbrev(oid, abbrev),
100
size_text);
100
- } else
101
+ } else {
102
printf("%06o %s %s\t", mode, type,
103
find_unique_abbrev(oid, abbrev));
104
+ }
105
}
106
baselen = base->len;
107
strbuf_addstr(base, pathname);