{"thread":{"id":"40467","subject":"[PATCH] submodule-parallel-fetch: make some file local symbols static","startedAt":"2015-10-01T12:02:42Z","lastAt":"2015-10-02T17:45:30Z","messageCount":4,"participants":["Ramsay Jones","Stefan Beller","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"270979","messageId":"560D20E2.4060601@ramsayjones.plus.com","threadId":"40467","inReplyTo":null,"subject":"[PATCH] submodule-parallel-fetch: make some file local symbols static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2015-10-01T12:02:42Z","receivedAt":"2015-10-01T12:02:42Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nCommits 0fc1fdb0 (\"fetch_populated_submodules: use new parallel job\nprocessing\", 28-09-2015) and 60f24f52 (\"run-command: add an asynchronous\nparallel child processor\", 28-09-2015) both introduce external symbols\nwhich only require file scope visibility. In order to reduce the\nvisibility, apply the static keyword to their declarations.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Stefan,\n\nNo, despite the same subject, this is not the same patch that I sent\nyou last week! :-D\n\nCould you please squash parts of this into the patches corresponding\nto the above mentioned commits.\n\nThanks!\n\nBTW, I would once again suggest that you could move the definition of\nget_next_submodule() to be above/before fetch_populated_submodules()\nso that you can remove the forward declaration.\n\nATB,\nRamsay Jones\n\n run-command.c | 2 +-\n submodule.c   | 8 ++++----\n 2 files changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/run-command.c b/run-command.c\nindex 341b23b..347d22e 100644\n--- a/run-command.c\n+++ b/run-command.c\n@@ -865,7 +865,7 @@ int capture_command(struct child_process *cmd, struct strbuf *buf, size_t hint)\n \treturn finish_command(cmd);\n }\n \n-struct parallel_processes {\n+static struct parallel_processes {\n \tvoid *data;\n \n \tint max_processes;\ndiff --git a/submodule.c b/submodule.c\nindex bd6e208..638efb5 100644\n--- a/submodule.c\n+++ b/submodule.c\n@@ -622,8 +622,8 @@ struct submodule_parallel_fetch {\n };\n #define SPF_INIT {0, ARGV_ARRAY_INIT, NULL, NULL, 0, 0, 0}\n \n-int get_next_submodule(void *data, struct child_process *cp,\n-\t\t       struct strbuf *err);\n+static int get_next_submodule(void *data, struct child_process *cp,\n+\t\t\t      struct strbuf *err);\n \n static int fetch_start_failure(void *data, struct child_process *cp,\n \t\t\t       struct strbuf *err)\n@@ -682,8 +682,8 @@ out:\n \treturn spf.result;\n }\n \n-int get_next_submodule(void *data, struct child_process *cp,\n-\t\t       struct strbuf *err)\n+static int get_next_submodule(void *data, struct child_process *cp,\n+\t\t\t      struct strbuf *err)\n {\n \tint ret = 0;\n \tstruct submodule_parallel_fetch *spf = data;\n-- \n2.6.0\n"},{"id":"270982","messageId":"CAGZ79kZzLtK7+rHRG_misaa9=fWF+oyeryBa+kbD3F+EB=3LMQ@mail.gmail.com","threadId":"40467","inReplyTo":"560D20E2.4060601@ramsayjones.plus.com","subject":"Re: [PATCH] submodule-parallel-fetch: make some file local symbols static","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-10-01T17:05:11Z","receivedAt":"2015-10-01T17:05:11Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, Oct 1, 2015 at 5:02 AM, Ramsay Jones\n<ramsay@ramsayjones.plus.com> wrote:\n>\n> Commits 0fc1fdb0 (\"fetch_populated_submodules: use new parallel job\n> processing\", 28-09-2015) and 60f24f52 (\"run-command: add an asynchronous\n> parallel child processor\", 28-09-2015) both introduce external symbols\n> which only require file scope visibility. In order to reduce the\n> visibility, apply the static keyword to their declarations.\n>\n> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n> ---\n>\n> Hi Stefan,\n>\n> No, despite the same subject, this is not the same patch that I sent\n> you last week! :-D\n>\n> Could you please squash parts of this into the patches corresponding\n> to the above mentioned commits.\n\nI am sorry for the need to send this second patch. :(\n\n>\n> Thanks!\n>\n> BTW, I would once again suggest that you could move the definition of\n> get_next_submodule() to be above/before fetch_populated_submodules()\n> so that you can remove the forward declaration.\n>\n> ATB,\n> Ramsay Jones\n>\n>  run-command.c | 2 +-\n>  submodule.c   | 8 ++++----\n>  2 files changed, 5 insertions(+), 5 deletions(-)\n>\n> diff --git a/run-command.c b/run-command.c\n> index 341b23b..347d22e 100644\n> --- a/run-command.c\n> +++ b/run-command.c\n> @@ -865,7 +865,7 @@ int capture_command(struct child_process *cmd, struct strbuf *buf, size_t hint)\n>         return finish_command(cmd);\n>  }\n>\n> -struct parallel_processes {\n> +static struct parallel_processes {\n\nwill pickup in a reroll\n\n>         void *data;\n>\n>         int max_processes;\n> diff --git a/submodule.c b/submodule.c\n> index bd6e208..638efb5 100644\n> --- a/submodule.c\n> +++ b/submodule.c\n> @@ -622,8 +622,8 @@ struct submodule_parallel_fetch {\n>  };\n>  #define SPF_INIT {0, ARGV_ARRAY_INIT, NULL, NULL, 0, 0, 0}\n>\n> -int get_next_submodule(void *data, struct child_process *cp,\n> -                      struct strbuf *err);\n> +static int get_next_submodule(void *data, struct child_process *cp,\n> +                             struct strbuf *err);\n\nI thought I had this in yesterdays reroll (v6). Oh you're referring to\nthe version\nfrom the 28th (I forgot to label them v5 I suppose).\n\nI will also get rid of the forward declaration.\n\n>\n>  static int fetch_start_failure(void *data, struct child_process *cp,\n>                                struct strbuf *err)\n> @@ -682,8 +682,8 @@ out:\n>         return spf.result;\n>  }\n>\n> -int get_next_submodule(void *data, struct child_process *cp,\n> -                      struct strbuf *err)\n> +static int get_next_submodule(void *data, struct child_process *cp,\n> +                             struct strbuf *err)\n>  {\n>         int ret = 0;\n>         struct submodule_parallel_fetch *spf = data;\n> --\n> 2.6.0\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"270987","messageId":"560D7EE2.8060403@ramsayjones.plus.com","threadId":"40467","inReplyTo":"CAGZ79kZzLtK7+rHRG_misaa9=fWF+oyeryBa+kbD3F+EB=3LMQ@mail.gmail.com","subject":"Re: [PATCH] submodule-parallel-fetch: make some file local symbols static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2015-10-01T18:43:46Z","receivedAt":"2015-10-01T18:43:46Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 01/10/15 18:05, Stefan Beller wrote:\n> On Thu, Oct 1, 2015 at 5:02 AM, Ramsay Jones\n> <ramsay@ramsayjones.plus.com> wrote:\n>>\n[snip]\n\n>> diff --git a/run-command.c b/run-command.c\n>> index 341b23b..347d22e 100644\n>> --- a/run-command.c\n>> +++ b/run-command.c\n>> @@ -865,7 +865,7 @@ int capture_command(struct child_process *cmd, struct strbuf *buf, size_t hint)\n>>         return finish_command(cmd);\n>>  }\n>>\n>> -struct parallel_processes {\n>> +static struct parallel_processes {\n> \n> will pickup in a reroll\n\nThanks\n\n> \n>>         void *data;\n>>\n>>         int max_processes;\n>> diff --git a/submodule.c b/submodule.c\n>> index bd6e208..638efb5 100644\n>> --- a/submodule.c\n>> +++ b/submodule.c\n>> @@ -622,8 +622,8 @@ struct submodule_parallel_fetch {\n>>  };\n>>  #define SPF_INIT {0, ARGV_ARRAY_INIT, NULL, NULL, 0, 0, 0}\n>>\n>> -int get_next_submodule(void *data, struct child_process *cp,\n>> -                      struct strbuf *err);\n>> +static int get_next_submodule(void *data, struct child_process *cp,\n>> +                             struct strbuf *err);\n> \n> I thought I had this in yesterdays reroll (v6). Oh you're referring to\n> the version\n> from the 28th (I forgot to label them v5 I suppose).\n\nAh! I thought I'd seen it on the list. (I thought I was going crazy) ;-)\nSorry, my fault. I just assumed that today's pu branch would have your\nlatest patches - I didn't actually check that.\n\nNote that the first hunk, above, is actually new (I hadn't noticed it\nbefore).\n\n> \n> I will also get rid of the forward declaration.\n\nThanks!\n\nATB,\nRamsay Jones\n\n> \n>>\n>>  static int fetch_start_failure(void *data, struct child_process *cp,\n>>                                struct strbuf *err)\n>> @@ -682,8 +682,8 @@ out:\n>>         return spf.result;\n>>  }\n>>\n>> -int get_next_submodule(void *data, struct child_process *cp,\n>> -                      struct strbuf *err)\n>> +static int get_next_submodule(void *data, struct child_process *cp,\n>> +                             struct strbuf *err)\n>>  {\n>>         int ret = 0;\n>>         struct submodule_parallel_fetch *spf = data;\n>> --\n"},{"id":"271024","messageId":"xmqqmvw15flx.fsf@gitster.mtv.corp.google.com","threadId":"40467","inReplyTo":"560D7EE2.8060403@ramsayjones.plus.com","subject":"Re: [PATCH] submodule-parallel-fetch: make some file local symbols static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-10-02T17:45:30Z","receivedAt":"2015-10-02T17:45:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n\n>> I thought I had this in yesterdays reroll (v6). Oh you're referring to\n>> the version\n>> from the 28th (I forgot to label them v5 I suppose).\n>\n> Ah! I thought I'd seen it on the list. (I thought I was going crazy) ;-)\n> Sorry, my fault. I just assumed that today's pu branch would have your\n> latest patches - I didn't actually check that.\n\nSometimes I take a one-day vacation ;-)\n\nThanks.\n"}]}