]> git.ipfire.org Git - thirdparty/git.git/commitdiff
submodule: fix style in function definition
authorShourya Shukla <shouryashukla.oo@gmail.com>
Tue, 25 Aug 2020 11:30:19 +0000 (17:00 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Aug 2020 20:43:21 +0000 (13:43 -0700)
The definitions of 'verify_submodule_committish()' and
'print_submodule_summary()' had wrong styling in terms of the asterisk
placement. Amend them.

Also, the warning printed in case of an unexpected file mode printed the
mode in decimal. Print it in octal for enhanced readability.

Reported-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c

index b83f840251503d6693b3b19df7c9eec88debcabd..93d0700891993edbef7fdcadde7c1b4c5807b66e 100644 (file)
@@ -959,7 +959,7 @@ enum diff_cmd {
        DIFF_FILES
 };
 
-static charverify_submodule_committish(const char *sm_path,
+static char *verify_submodule_committish(const char *sm_path,
                                         const char *committish)
 {
        struct child_process cp_rev_parse = CHILD_PROCESS_INIT;
@@ -979,7 +979,7 @@ static char* verify_submodule_committish(const char *sm_path,
        return strbuf_detach(&result, NULL);
 }
 
-static void print_submodule_summary(struct summary_cb *info, charerrmsg,
+static void print_submodule_summary(struct summary_cb *info, char *errmsg,
                                    int total_commits, const char *displaypath,
                                    const char *src_abbrev, const char *dst_abbrev,
                                    struct module_cb *p)
@@ -1056,7 +1056,7 @@ static void generate_submodule_summary(struct summary_cb *info,
                } else {
                        /* for a submodule removal (mode:0000000), don't warn */
                        if (p->mod_dst)
-                               warning(_("unexpected mode %d\n"), p->mod_dst);
+                               warning(_("unexpected mode %o\n"), p->mod_dst);
                }
        }