]> git.ipfire.org Git - thirdparty/git.git/commitdiff
progress.c test helper: add missing braces
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 3 Feb 2022 21:40:12 +0000 (22:40 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Feb 2022 23:39:55 +0000 (15:39 -0800)
If we have braces on one arm of an if/else all of them should have it,
per the CodingGuidelines's "When there are multiple arms to a
conditional[...]" advice. This formatting change makes a subsequent
commit smaller.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-progress.c

index 9265e6ab7cf50eb9d0e0c185e4255587e7194387..50fd3be3dad7f5d6028e4a2ebc7b4a40e98d10fd 100644 (file)
@@ -63,10 +63,11 @@ int cmd__progress(int argc, const char **argv)
                                die("invalid input: '%s'\n", line.buf);
                        progress_test_ns = test_ms * 1000 * 1000;
                        display_throughput(progress, byte_count);
-               } else if (!strcmp(line.buf, "update"))
+               } else if (!strcmp(line.buf, "update")) {
                        progress_test_force_update();
-               else
+               } else {
                        die("invalid input: '%s'\n", line.buf);
+               }
        }
        stop_progress(&progress);
        strbuf_release(&line);