Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-01-07 12:51:49 +0300
committerJunio C Hamano <gitster@pobox.com>2021-01-08 02:13:21 +0300
commit75c50e599ca4fe2fcf864cfa491c8035513e6cdb (patch)
treebd4909f4a5baae437a8202307b068184e5f54be9 /ref-filter.c
parent08bf6a8bc351a720f07e1afecb46b1bfae64c7ab (diff)
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>
Diffstat (limited to 'ref-filter.c')
-rw-r--r--ref-filter.c6
1 files changed, 3 insertions, 3 deletions
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)