[PATCH 2/3] make-static: next

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Many symbols that are exported to the global scope do not have to be.

This needs to be split into separate patches and queued on top of each
individual topic.

Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
---
 builtin/revert.c |    2 +-
 credential.c     |   46 +++++++++++++++++++++++-----------------------
 credential.h     |    1 -
 submodule.c      |    4 ++--
 4 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/builtin/revert.c b/builtin/revert.c
index 5e97622..515f3cc 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -659,7 +659,7 @@ static void read_and_refresh_cache(struct replay_opts *opts)
  *     assert(commit_list_count(list) == 2);
  *     return list;
  */
-struct commit_list **commit_list_append(struct commit *commit,
+static struct commit_list **commit_list_append(struct commit *commit,
 					struct commit_list **next)
 {
 	struct commit_list *new = xmalloc(sizeof(struct commit_list));
diff --git a/credential.c b/credential.c
index 7a0c751..6243b03 100644
--- a/credential.c
+++ b/credential.c
@@ -171,6 +171,29 @@ static int credential_do(struct credential *c, const char *method,
 	return r;
 }
 
+static int credential_fill_gently(struct credential *c,
+				  const struct string_list *methods)
+{
+	int i;
+
+	if (c->username && c->password)
+		return 0;
+
+	if (!methods)
+		methods = &default_methods;
+
+	if (!methods->nr)
+		return credential_getpass(c);
+
+	for (i = 0; i < methods->nr; i++) {
+		if (!credential_do(c, methods->items[i].string, NULL) &&
+		    c->username && c->password)
+			return 0;
+	}
+
+	return -1;
+}
+
 void credential_fill(struct credential *c, const struct string_list *methods)
 {
 	struct strbuf err = STRBUF_INIT;
@@ -195,29 +218,6 @@ void credential_fill(struct credential *c, const struct string_list *methods)
 	die("%s", err.buf);
 }
 
-int credential_fill_gently(struct credential *c,
-			   const struct string_list *methods)
-{
-	int i;
-
-	if (c->username && c->password)
-		return 0;
-
-	if (!methods)
-		methods = &default_methods;
-
-	if (!methods->nr)
-		return credential_getpass(c);
-
-	for (i = 0; i < methods->nr; i++) {
-		if (!credential_do(c, methods->items[i].string, NULL) &&
-		    c->username && c->password)
-			return 0;
-	}
-
-	return -1;
-}
-
 void credential_reject(struct credential *c, const struct string_list *methods)
 {
 	int i;
diff --git a/credential.h b/credential.h
index 788ed8e..07541ad 100644
--- a/credential.h
+++ b/credential.h
@@ -13,7 +13,6 @@ struct string_list;
 int credential_getpass(struct credential *);
 void credential_from_config(struct credential *);
 
-int credential_fill_gently(struct credential *, const struct string_list *methods);
 void credential_fill(struct credential *, const struct string_list *methods);
 void credential_reject(struct credential *, const struct string_list *methods);
 
diff --git a/submodule.c b/submodule.c
index 38d9877..5a02890 100644
--- a/submodule.c
+++ b/submodule.c
@@ -318,7 +318,7 @@ static int has_remote(const char *refname, const unsigned char *sha1, int flags,
 	return 1;
 }
 
-int submodule_needs_pushing(const char *path, const unsigned char sha1[20], void *data)
+static int submodule_needs_pushing(const char *path, const unsigned char sha1[20], void *data)
 {
 	int *needs_pushing = data;
 
@@ -352,7 +352,7 @@ int submodule_needs_pushing(const char *path, const unsigned char sha1[20], void
 	return 1;
 }
 
-int push_submodule(const char *path, const unsigned char sha1[20], void *data)
+static int push_submodule(const char *path, const unsigned char sha1[20], void *data)
 {
 	if (add_submodule_odb(path) || !lookup_commit_reference(sha1))
 		return 1;
-- 
1.7.7.rc0.188.g3793ac

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]