]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fast-export: fix missing whitespace after switch
authorChristian Couder <christian.couder@gmail.com>
Mon, 10 Mar 2025 15:57:42 +0000 (16:57 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Mar 2025 20:24:55 +0000 (13:24 -0700)
"Documentation/CodingGuidelines" says that there should be whitespaces
around operators like 'if', 'switch', 'for', etc.

Let's fix this in "builtin/fast-export.c".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fast-export.c

index a5c82eef1ded4dae5b4128781868e2c656eedfbd..2bf787191a4d10cacc0c2358d8f943c7d6acd78c 100644 (file)
@@ -694,7 +694,7 @@ static void handle_commit(struct commit *commit, struct rev_info *rev,
        if (anonymize) {
                reencoded = anonymize_commit_message();
        } else if (encoding) {
-               switch(reencode_mode) {
+               switch (reencode_mode) {
                case REENCODE_YES:
                        reencoded = reencode_string(message, "UTF-8", encoding);
                        break;
@@ -828,7 +828,7 @@ static void handle_tag(const char *name, struct tag *tag)
                const char *signature = strstr(message,
                                               "\n-----BEGIN PGP SIGNATURE-----\n");
                if (signature)
-                       switch(signed_tag_mode) {
+                       switch (signed_tag_mode) {
                        case SIGNED_TAG_ABORT:
                                die("encountered signed tag %s; use "
                                    "--signed-tags=<mode> to handle it",
@@ -853,7 +853,7 @@ static void handle_tag(const char *name, struct tag *tag)
        tagged = tag->tagged;
        tagged_mark = get_object_mark(tagged);
        if (!tagged_mark) {
-               switch(tag_of_filtered_mode) {
+               switch (tag_of_filtered_mode) {
                case TAG_FILTERING_ABORT:
                        die("tag %s tags unexported object; use "
                            "--tag-of-filtered-object=<mode> to handle it",
@@ -965,7 +965,7 @@ static void get_tags_and_duplicates(struct rev_cmdline_info *info)
                        continue;
                }
 
-               switch(commit->object.type) {
+               switch (commit->object.type) {
                case OBJ_COMMIT:
                        break;
                case OBJ_BLOB: