From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 00/10] mark private symbols static
Date: Wed, 14 Jan 2015 15:40:45 -0800 [thread overview]
Message-ID: <1421278855-8126-1-git-send-email-gitster@pobox.com> (raw)
Here are a handful of patches to make symbols that are only used
within a .c file as static. This is not the kind of changes we
would want to do in the pre-release freeze period, and it is just
for reference. I may later come back to them after 2.3 final is
tagged.
Note that I did not blindly make everything that _could_ be made
static; the ones I deliberately left untouched are:
* config.c: this has a lot of git_configset_*() API functions that
were developed but not yet used (as part of 3/4-way done GSoc
project that did not fully convert users of the config subsystem
to these new style functions); making them static merely because
they are not yet used goes backwards.
* ewah/* and xdiff/*: I consider these borrowed code, which we
would want to avoid touching in the same series as our own code.
* graph.c: graph_next_line() and graph_set_column_colors() are not
called externally, but I suspect that they are API functions
waiting for a new caller to appear.
* line-log.c: range_set_append() is not called externally, but this
is only because a caller calls range_set_append_unsafe(), its
sibling, which may want to be cleaned up.
* refs.c: rollback_packed_refs() is not called externally, but the
codebase around refs API is in flux and I did not want to add to
the code churn.
* strbuf.c: xstrvfmt() is not called externally, but this is a
reasonable API function to keep; its friend xstrfmt() is used by
many places.
* string-list.c: print_string_list() may want to go, but it may
be useful for debugging, so I kept it in.
* wrapper.c: rmdir_or_warn() is not used externally, but this is a
reasonable API function as its friends like unlink_or_warn() that
are used.
The last patch in the series is very questionable. Instead of
hiding unused author_ident_sufficiently_given() function (and
possibly removing it), it adds external callers to justify its
existence ;-)
Junio C Hamano (10):
http.c: make finish_active_slot() and handle_curl_result() static
line-log.c: make line_log_data_init() static
prompt.c: remove git_getpass() nobody uses
revision.c: make save_parents() and free_saved_parents() static
urlmatch.c: make match_urls() static
remote.c: make clear_cas_option() static
shallow.c: make check_shallow_file_for_update() static
pack-bitmap.c: make pack_bitmap_filename() static
read-cache.c: make fill/match_stat_data() static
commit: show "Author:" hint when the ident is not given explicitly
builtin/commit.c | 6 ++--
cache.h | 14 --------
commit.h | 1 -
http.c | 64 ++++++++++++++++-----------------
http.h | 2 --
line-log.c | 2 +-
line-log.h | 2 --
pack-bitmap.c | 28 +++++++--------
pack-bitmap.h | 1 -
prompt.c | 5 ---
prompt.h | 1 -
read-cache.c | 14 ++++++--
remote.c | 2 +-
remote.h | 1 -
revision.c | 106 +++++++++++++++++++++++++++++--------------------------
revision.h | 12 +++----
shallow.c | 2 +-
urlmatch.c | 6 ++--
urlmatch.h | 1 -
19 files changed, 127 insertions(+), 143 deletions(-)
--
2.3.0-rc0-134-g109a908
next reply other threads:[~2015-01-14 23:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 23:40 Junio C Hamano [this message]
2015-01-14 23:40 ` [PATCH 01/10] http.c: make finish_active_slot() and handle_curl_result() static Junio C Hamano
2015-01-15 6:41 ` Jeff King
2015-01-14 23:40 ` [PATCH 02/10] line-log.c: make line_log_data_init() static Junio C Hamano
2015-01-14 23:40 ` [PATCH 03/10] prompt.c: remove git_getpass() nobody uses Junio C Hamano
2015-01-15 6:47 ` Jeff King
2015-01-14 23:40 ` [PATCH 04/10] revision.c: make save_parents() and free_saved_parents() static Junio C Hamano
2015-01-14 23:40 ` [PATCH 05/10] urlmatch.c: make match_urls() static Junio C Hamano
2015-01-15 6:49 ` Jeff King
2015-01-14 23:40 ` [PATCH 06/10] remote.c: make clear_cas_option() static Junio C Hamano
2015-01-14 23:40 ` [PATCH 07/10] shallow.c: make check_shallow_file_for_update() static Junio C Hamano
2015-01-14 23:40 ` [PATCH 08/10] pack-bitmap.c: make pack_bitmap_filename() static Junio C Hamano
2015-01-15 6:51 ` Jeff King
2015-01-14 23:40 ` [PATCH 09/10] read-cache.c: make fill/match_stat_data() static Junio C Hamano
2015-01-14 23:40 ` [PATCH 10/10] commit: show "Author:" hint when the ident is not given explicitly Junio C Hamano
2015-01-15 7:17 ` Jeff King
2015-01-15 0:07 ` [PATCH 00/10] mark private symbols static Stefan Beller
2015-01-15 7:18 ` Jeff King
2015-01-15 17:52 ` 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=1421278855-8126-1-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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).