From: Junio C Hamano <junio@pobox.com>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: [PATCH 2/3] make-static: next
Date: Sun, 11 Sep 2011 14:38:30 -0700 [thread overview]
Message-ID: <7vaaaan4ix.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 4E6D0E3F.3090304@ramsay1.demon.co.uk
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@pobox.com>
---
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
next prev parent reply other threads:[~2011-09-11 21:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-11 19:38 [PATCH 1/3] sparse: Fix some "symbol not declared" warnings Ramsay Jones
2011-09-11 21:38 ` Junio C Hamano
2011-09-12 0:06 ` Junio C Hamano
2011-09-11 21:38 ` [PATCH 1/3] make-static: master Junio C Hamano
2011-09-12 6:14 ` Ramkumar Ramachandra
2011-09-15 4:29 ` Junio C Hamano
2011-09-13 22:51 ` Ramsay Jones
2011-09-13 23:46 ` Junio C Hamano
2011-09-14 6:50 ` Johannes Sixt
2011-09-14 19:03 ` Junio C Hamano
2011-09-14 20:33 ` Junio C Hamano
2011-09-14 8:52 ` Thomas Rast
2011-09-11 21:38 ` Junio C Hamano [this message]
2011-09-11 21:38 ` [PATCH 3/3] make-static: pu Junio C Hamano
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=7vaaaan4ix.fsf@alter.siamese.dyndns.org \
--to=junio@pobox.com \
--cc=git@vger.kernel.org \
--cc=ramsay@ramsay1.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).