Skip to content

Commit f0c6b64

Browse files
periperidipgitster
authored andcommitted
submodule: fix style in function definition
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 <[email protected]> Mentored-by: Christian Couder <[email protected]> Mentored-by: Kaartic Sivaraam <[email protected]> Helped-by: Junio C Hamano <[email protected]> Signed-off-by: Shourya Shukla <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e0f7ae5 commit f0c6b64

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/submodule--helper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ enum diff_cmd {
959959
DIFF_FILES
960960
};
961961

962-
static char* verify_submodule_committish(const char *sm_path,
962+
static char *verify_submodule_committish(const char *sm_path,
963963
const char *committish)
964964
{
965965
struct child_process cp_rev_parse = CHILD_PROCESS_INIT;
@@ -979,7 +979,7 @@ static char* verify_submodule_committish(const char *sm_path,
979979
return strbuf_detach(&result, NULL);
980980
}
981981

982-
static void print_submodule_summary(struct summary_cb *info, char* errmsg,
982+
static void print_submodule_summary(struct summary_cb *info, char *errmsg,
983983
int total_commits, const char *displaypath,
984984
const char *src_abbrev, const char *dst_abbrev,
985985
struct module_cb *p)
@@ -1056,7 +1056,7 @@ static void generate_submodule_summary(struct summary_cb *info,
10561056
} else {
10571057
/* for a submodule removal (mode:0000000), don't warn */
10581058
if (p->mod_dst)
1059-
warning(_("unexpected mode %d\n"), p->mod_dst);
1059+
warning(_("unexpected mode %o\n"), p->mod_dst);
10601060
}
10611061
}
10621062

0 commit comments

Comments
 (0)