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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2021-01-07 10:51:49 +01:00 коммит произвёл Junio C Hamano
Родитель 08bf6a8bc3
Коммит 75c50e599c
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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)