From: Ævar Arnfjörð Bjarmason Date: Thu, 7 Jan 2021 09:51:49 +0000 (+0100) Subject: ref-filter: add braces to if/else if/else chain X-Git-Tag: v2.30.1~4^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75c50e599ca4fe2fcf864cfa491c8035513e6cdb;p=thirdparty%2Fgit.git ref-filter: add braces to if/else if/else chain Per the CodingGuidelines add braces to an if/else if/else chain where only the "else" had braces. This is in preparation for a subsequent change where the "else if" will have lines added to it. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- diff --git a/ref-filter.c b/ref-filter.c index aa260bfd09..e4c162a8c3 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -2364,11 +2364,11 @@ static int cmp_ref_sorting(struct ref_sorting *s, struct ref_array_item *a, stru die("%s", err.buf); strbuf_release(&err); cmp_fn = s->ignore_case ? strcasecmp : strcmp; - if (s->version) + if (s->version) { cmp = versioncmp(va->s, vb->s); - else if (cmp_type == FIELD_STR) + } else if (cmp_type == FIELD_STR) { cmp = cmp_fn(va->s, vb->s); - else { + } else { if (va->value < vb->value) cmp = -1; else if (va->value == vb->value)