]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ls-tree: add missing braces to "else" arms
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 23 Mar 2022 09:13:03 +0000 (17:13 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Mar 2022 18:38:38 +0000 (11:38 -0700)
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>
builtin/ls-tree.c

index 5f7c84950cee53f9177dc0ba252a10de7d85bed6..0a28f32ccb96312fa051a002a906661e96f3c95b 100644 (file)
@@ -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);