Message ID | 20200825113020.71801-3-shouryashukla.oo@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | submodule: fixup to summary-v3 | expand |
Shourya Shukla <shouryashukla.oo@gmail.com> writes: > The definitions of 'verify_submodule_committish()' and > 'print_submodule_summary()' had wrong styling in terms of the asterisk > placement. Amend them. I pointed out only these two, but that does not necessarily mean they are the only ones. Have you checked all the new code added by the series? > Also, the warning printed in case of an unexpected file mode printed the > mode in decimal. Print it in octal for enhanced readability. I actually did check this side ;-) and am reasonably sure that there aren't any other irrational choice of format specifiers. Thanks.
>> The definitions of 'verify_submodule_committish()' and >> 'print_submodule_summary()' had wrong styling in terms of the asterisk >> placement. Amend them. > I pointed out only these two, but that does not necessarily mean > they are the only ones. Have you checked all the new code added by > the series? There is one more. It is not related to my patch series though. Here it is: ---- static char *compute_rev_name(const char *sub_path, const char* object_id) ---- Would you like me to correct this one too? >> Also, the warning printed in case of an unexpected file mode printed the >> mode in decimal. Print it in octal for enhanced readability. >I actually did check this side ;-) and am reasonably sure that there >aren't any other irrational choice of format specifiers. Sure! No worries!
Shourya Shukla <shouryashukla.oo@gmail.com> writes: >>> The definitions of 'verify_submodule_committish()' and >>> 'print_submodule_summary()' had wrong styling in terms of the asterisk >>> placement. Amend them. > >> I pointed out only these two, but that does not necessarily mean >> they are the only ones. Have you checked all the new code added by >> the series? > > There is one more. It is not related to my patch series though. Cleaning up the existing breakage is outside the scope your series, but of course fixes as an independent patch is welcomed. Thanks for checking.
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index b83f840251..93d0700891 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -959,7 +959,7 @@ enum diff_cmd { DIFF_FILES }; -static char* verify_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, char* errmsg, +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); } }
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> --- builtin/submodule--helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)