Thread (25 messages) flat view 25 messages, 3 authors, 2017-08-05

Re: [GSoC][PATCH 08/13] submodule: port submodule subcommand 'summary' from shell to C

From: Prathamesh Chavan <hidden>
Date: 2017-08-05 18:03:15

On Sat, Aug 5, 2017 at 10:25 PM, Christian Couder
[off-list ref] wrote:
On Sat, Aug 5, 2017 at 12:28 PM, Prathamesh Chavan [off-list ref] wrote:
quoted
On Tue, Aug 1, 2017 at 4:57 AM, Christian Couder
[off-list ref] wrote:
quoted
On Mon, Jul 31, 2017 at 10:56 PM, Prathamesh Chavan [off-list ref] wrote:
We can avoid it to behave same for "" and NULL, by checking if diff_cmd
is "cmd_diff_files", since its value is set NULL by this case.

ret = compute_summary_module_list(strcmp(diff_cmd, "diff-files") ?
NULL: sb.buf, &info);
strbuf_release(&sb);
It looks error prone, more fagile and less efficient to me.
I think by using enum { DIFF_INDEX, DIFF_FILES },
we can avoid using strcmp() here, and make it more efficient
not only here but also in other parts of the code, since
all such steps involving strcmp could be removed.

Thanks,
Prathamesh Chavan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help