From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Kjetil Barvik <barvik@broadpark.no>,
Marius Storm-Olsen <marius@trolltech.com>,
Daniel Barkalow <barkalow@iabervon.org>,
Thiago Farina <tfransosi@gmail.com>,
Nicolas Pitre <nico@fluxnic.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: [PATCH 00/18] mark file-local symbols static
Date: Mon, 11 Jan 2010 23:52:43 -0800 [thread overview]
Message-ID: <1263282781-25596-1-git-send-email-gitster@pobox.com> (raw)
The early part of the series up to [PATCH 12/18] are uncontroversial; they
all change "extern" symbols that are not used outside of the file they are
defined in to "static".
The remainder remove functions that are not called from anywhere. While
the result of applying these patches still compiles, I find removal of
some are iffy:
* map_email(), has_pack_file() and strbuf_tolower() are not even
documented. They should go. It is trivial to reimplement them when a
new caller needs it.
* Even though parse_blob() in blob.c is never called, it is part of the
"object layer" suite that consistently defines their initializers as
parse_$type(). But it has never been called by anybody since its
inception at a510bfa (Mark blobs as parsed when they're actually
parsed, 2005-04-28).
By the way, Documentation/technical/api-object-access.txt needs some
love.
* object_list_append() and object_list_length() in object.c do not have
any callers, and they are implementations of rather inefficient API.
Perhaps they should go.
* I am a bit worried about nobody calling invalidate_lstat_cache() and
clear_lstat_cache(). Kjetil introduced them in aeabab5 (lstat_cache():
introduce invalidate_lstat_cache() function, 2009-01-18) and bda6eb0
(lstat_cache(): introduce clear_lstat_cache() function, 2009-01-18)
respectively but as far as I can tell there wasn't any user of these
functions, ever. They may be broken and nobody knew they were as
nothing calls them, but more importantly it could be that some existing
codepaths aren't calling them when they should.
In this series, I am not removing alloc_report(), print_string_list(), and
unsorted_string_list_has_string(). Among these three, the first two are
clearly for debugging and the latter two are documented interfaces, even
though nobody uses them.
I've made sure that they apply to 'master', 'next' and 'pu' (application
to 'pu' has two conflicts that are trivial in 04/18 and 08/18) and the
result compiles.
Junio C Hamano (18):
bisect.c: mark file-local function static
builtin-rev-list.c: mark file-local function static
pretty.c: mark file-local function static
date.c: mark file-local function static
http.c: mark file-local functions static
entry.c: mark file-local function static
parse-options.c: mark file-local function static
read-cache.c: mark file-local functions static
remote-curl.c: mark file-local function static
quote.c: mark file-local function static
submodule.c: mark file-local function static
utf8.c: mark file-local function static
mailmap.c: remove unused function
sha1_file.c: remove unused function
strbuf.c: remove unused function
blob.c: remove unused function
object.c: remove unused functions
symlinks.c: remove unused functions
bisect.c | 2 +-
bisect.h | 2 --
blob.c | 21 ---------------------
blob.h | 2 --
builtin-rev-list.c | 2 +-
cache.h | 8 --------
commit.h | 1 -
date.c | 2 +-
entry.c | 2 +-
git-compat-util.h | 1 -
http.c | 10 ++++++++--
http.h | 9 ---------
mailmap.c | 5 -----
mailmap.h | 1 -
object.c | 21 ---------------------
object.h | 5 -----
parse-options.c | 7 +++++--
parse-options.h | 3 ---
pretty.c | 2 +-
quote.c | 2 +-
quote.h | 1 -
read-cache.c | 6 ++++--
remote-curl.c | 2 +-
sha1_file.c | 8 --------
strbuf.c | 7 -------
strbuf.h | 1 -
submodule.c | 2 +-
symlinks.c | 31 -------------------------------
utf8.c | 2 +-
utf8.h | 1 -
30 files changed, 26 insertions(+), 143 deletions(-)
next reply other threads:[~2010-01-12 7:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-12 7:52 Junio C Hamano [this message]
2010-01-12 7:52 ` [PATCH 01/18] bisect.c: mark file-local function static Junio C Hamano
2010-01-12 7:52 ` [PATCH 02/18] builtin-rev-list.c: " Junio C Hamano
2010-01-12 7:52 ` [PATCH 03/18] pretty.c: " Junio C Hamano
2010-01-12 7:52 ` [PATCH 04/18] date.c: " Junio C Hamano
2010-01-12 8:37 ` Johannes Sixt
2010-01-12 9:05 ` Junio C Hamano
2010-01-12 9:43 ` Johannes Sixt
2010-01-12 7:52 ` [PATCH 05/18] http.c: mark file-local functions static Junio C Hamano
2010-01-12 7:52 ` [PATCH 06/18] entry.c: mark file-local function static Junio C Hamano
2010-01-12 7:52 ` [PATCH 07/18] parse-options.c: " Junio C Hamano
2010-01-12 7:52 ` [PATCH 08/18] read-cache.c: mark file-local functions static Junio C Hamano
2010-01-12 7:52 ` [PATCH 09/18] remote-curl.c: mark file-local function static Junio C Hamano
2010-01-12 7:52 ` [PATCH 10/18] quote.c: " Junio C Hamano
2010-01-12 7:52 ` [PATCH 11/18] submodule.c: " Junio C Hamano
2010-01-12 7:52 ` [PATCH 12/18] utf8.c: " Junio C Hamano
2010-01-12 7:52 ` [PATCH 13/18] mailmap.c: remove unused function Junio C Hamano
2010-01-12 7:52 ` [PATCH 14/18] sha1_file.c: " Junio C Hamano
2010-01-12 7:52 ` [PATCH 15/18] strbuf.c: " Junio C Hamano
2010-01-12 7:52 ` [PATCH 16/18] blob.c: " Junio C Hamano
2010-01-12 17:37 ` Daniel Barkalow
2010-01-13 6:56 ` Junio C Hamano
2010-01-12 7:53 ` [PATCH 17/18] object.c: remove unused functions Junio C Hamano
2010-01-12 7:53 ` [PATCH 18/18] symlinks.c: " 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=1263282781-25596-1-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=barkalow@iabervon.org \
--cc=barvik@broadpark.no \
--cc=git@vger.kernel.org \
--cc=marius@trolltech.com \
--cc=nico@fluxnic.net \
--cc=tfransosi@gmail.com \
/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).