1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-27 06:26:13 +02:00

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>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2022-03-23 17:13:03 +08:00 committed by Junio C Hamano
parent 4e4566f67e
commit 82e69b0cb5

View 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);