public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsayjones•plus.com>
To: Stefan Beller <stefanbeller@gmail•com>
Cc: Junio C Hamano <gitster@pobox•com>,
	GIT Mailing-list <git@vger•kernel.org>
Subject: [PATCH] submodule-parallel-fetch: make some file local symbols static
Date: Thu, 1 Oct 2015 13:02:42 +0100	[thread overview]
Message-ID: <560D20E2.4060601@ramsayjones.plus.com> (raw)


Commits 0fc1fdb0 ("fetch_populated_submodules: use new parallel job
processing", 28-09-2015) and 60f24f52 ("run-command: add an asynchronous
parallel child processor", 28-09-2015) both introduce external symbols
which only require file scope visibility. In order to reduce the
visibility, apply the static keyword to their declarations.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones•plus.com>
---

Hi Stefan,

No, despite the same subject, this is not the same patch that I sent
you last week! :-D

Could you please squash parts of this into the patches corresponding
to the above mentioned commits.

Thanks!

BTW, I would once again suggest that you could move the definition of
get_next_submodule() to be above/before fetch_populated_submodules()
so that you can remove the forward declaration.

ATB,
Ramsay Jones

 run-command.c | 2 +-
 submodule.c   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/run-command.c b/run-command.c
index 341b23b..347d22e 100644
--- a/run-command.c
+++ b/run-command.c
@@ -865,7 +865,7 @@ int capture_command(struct child_process *cmd, struct strbuf *buf, size_t hint)
 	return finish_command(cmd);
 }
 
-struct parallel_processes {
+static struct parallel_processes {
 	void *data;
 
 	int max_processes;
diff --git a/submodule.c b/submodule.c
index bd6e208..638efb5 100644
--- a/submodule.c
+++ b/submodule.c
@@ -622,8 +622,8 @@ struct submodule_parallel_fetch {
 };
 #define SPF_INIT {0, ARGV_ARRAY_INIT, NULL, NULL, 0, 0, 0}
 
-int get_next_submodule(void *data, struct child_process *cp,
-		       struct strbuf *err);
+static int get_next_submodule(void *data, struct child_process *cp,
+			      struct strbuf *err);
 
 static int fetch_start_failure(void *data, struct child_process *cp,
 			       struct strbuf *err)
@@ -682,8 +682,8 @@ out:
 	return spf.result;
 }
 
-int get_next_submodule(void *data, struct child_process *cp,
-		       struct strbuf *err)
+static int get_next_submodule(void *data, struct child_process *cp,
+			      struct strbuf *err)
 {
 	int ret = 0;
 	struct submodule_parallel_fetch *spf = data;
-- 
2.6.0

             reply	other threads:[~2015-10-01 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 12:02 Ramsay Jones [this message]
2015-10-01 17:05 ` [PATCH] submodule-parallel-fetch: make some file local symbols static Stefan Beller
2015-10-01 18:43   ` Ramsay Jones
2015-10-02 17:45     ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2015-09-25 15:15 Ramsay Jones
2015-09-25 15:40 ` Jacob Keller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=560D20E2.4060601@ramsayjones.plus.com \
    --to=ramsay@ramsayjones$(echo .)plus.com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=stefanbeller@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox