{"thread":{"id":"38364","subject":"[PATCH 00/10] mark private symbols static","startedAt":"2015-01-14T23:40:45Z","lastAt":"2015-01-15T17:52:18Z","messageCount":19,"participants":["Junio C Hamano","Stefan Beller","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"254705","messageId":"1421278855-8126-1-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":null,"subject":"[PATCH 00/10] mark private symbols static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:45Z","receivedAt":"2015-01-14T23:40:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Here are a handful of patches to make symbols that are only used\nwithin a .c file as static.  This is not the kind of changes we\nwould want to do in the pre-release freeze period, and it is just\nfor reference.  I may later come back to them after 2.3 final is\ntagged.\n\nNote that I did not blindly make everything that _could_ be made\nstatic; the ones I deliberately left untouched are:\n\n * config.c: this has a lot of git_configset_*() API functions that\n   were developed but not yet used (as part of 3/4-way done GSoc\n   project that did not fully convert users of the config subsystem\n   to these new style functions); making them static merely because\n   they are not yet used goes backwards.\n\n * ewah/* and xdiff/*: I consider these borrowed code, which we\n   would want to avoid touching in the same series as our own code.\n\n * graph.c: graph_next_line() and graph_set_column_colors() are not\n   called externally, but I suspect that they are API functions\n   waiting for a new caller to appear.\n\n * line-log.c: range_set_append() is not called externally, but this\n   is only because a caller calls range_set_append_unsafe(), its\n   sibling, which may want to be cleaned up.\n\n * refs.c: rollback_packed_refs() is not called externally, but the\n   codebase around refs API is in flux and I did not want to add to\n   the code churn.\n\n * strbuf.c: xstrvfmt() is not called externally, but this is a\n   reasonable API function to keep; its friend xstrfmt() is used by\n   many places.\n\n * string-list.c: print_string_list() may want to go, but it may\n   be useful for debugging, so I kept it in.\n\n * wrapper.c: rmdir_or_warn() is not used externally, but this is a\n   reasonable API function as its friends like unlink_or_warn() that\n   are used.\n\n\nThe last patch in the series is very questionable.  Instead of\nhiding unused author_ident_sufficiently_given() function (and\npossibly removing it), it adds external callers to justify its\nexistence ;-)\n\n\nJunio C Hamano (10):\n  http.c: make finish_active_slot() and handle_curl_result() static\n  line-log.c: make line_log_data_init() static\n  prompt.c: remove git_getpass() nobody uses\n  revision.c: make save_parents() and free_saved_parents() static\n  urlmatch.c: make match_urls() static\n  remote.c: make clear_cas_option() static\n  shallow.c: make check_shallow_file_for_update() static\n  pack-bitmap.c: make pack_bitmap_filename() static\n  read-cache.c: make fill/match_stat_data() static\n  commit: show \"Author:\" hint when the ident is not given explicitly\n\n builtin/commit.c |   6 ++--\n cache.h          |  14 --------\n commit.h         |   1 -\n http.c           |  64 ++++++++++++++++-----------------\n http.h           |   2 --\n line-log.c       |   2 +-\n line-log.h       |   2 --\n pack-bitmap.c    |  28 +++++++--------\n pack-bitmap.h    |   1 -\n prompt.c         |   5 ---\n prompt.h         |   1 -\n read-cache.c     |  14 ++++++--\n remote.c         |   2 +-\n remote.h         |   1 -\n revision.c       | 106 +++++++++++++++++++++++++++++--------------------------\n revision.h       |  12 +++----\n shallow.c        |   2 +-\n urlmatch.c       |   6 ++--\n urlmatch.h       |   1 -\n 19 files changed, 127 insertions(+), 143 deletions(-)\n\n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254706","messageId":"1421278855-8126-2-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"[PATCH 01/10] http.c: make finish_active_slot() and handle_curl_result() static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:46Z","receivedAt":"2015-01-14T23:40:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"No external callers exist.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n http.c | 64 ++++++++++++++++++++++++++++++++--------------------------------\n http.h |  2 --\n 2 files changed, 32 insertions(+), 34 deletions(-)\n\ndiff --git a/http.c b/http.c\nindex 040f362..16a6a2d 100644\n--- a/http.c\n+++ b/http.c\n@@ -114,6 +114,37 @@ size_t fwrite_null(char *ptr, size_t eltsize, size_t nmemb, void *strbuf)\n \treturn eltsize * nmemb;\n }\n \n+static void closedown_active_slot(struct active_request_slot *slot)\n+{\n+\tactive_requests--;\n+\tslot->in_use = 0;\n+}\n+\n+static void finish_active_slot(struct active_request_slot *slot)\n+{\n+\tclosedown_active_slot(slot);\n+\tcurl_easy_getinfo(slot->curl, CURLINFO_HTTP_CODE, &slot->http_code);\n+\n+\tif (slot->finished != NULL)\n+\t\t(*slot->finished) = 1;\n+\n+\t/* Store slot results so they can be read after the slot is reused */\n+\tif (slot->results != NULL) {\n+\t\tslot->results->curl_result = slot->curl_result;\n+\t\tslot->results->http_code = slot->http_code;\n+#if LIBCURL_VERSION_NUM >= 0x070a08\n+\t\tcurl_easy_getinfo(slot->curl, CURLINFO_HTTPAUTH_AVAIL,\n+\t\t\t\t  &slot->results->auth_avail);\n+#else\n+\t\tslot->results->auth_avail = 0;\n+#endif\n+\t}\n+\n+\t/* Run callback if appropriate */\n+\tif (slot->callback_func != NULL)\n+\t\tslot->callback_func(slot->callback_data);\n+}\n+\n #ifdef USE_CURL_MULTI\n static void process_curl_messages(void)\n {\n@@ -730,12 +761,6 @@ void run_active_slot(struct active_request_slot *slot)\n #endif\n }\n \n-static void closedown_active_slot(struct active_request_slot *slot)\n-{\n-\tactive_requests--;\n-\tslot->in_use = 0;\n-}\n-\n static void release_active_slot(struct active_request_slot *slot)\n {\n \tclosedown_active_slot(slot);\n@@ -752,31 +777,6 @@ static void release_active_slot(struct active_request_slot *slot)\n #endif\n }\n \n-void finish_active_slot(struct active_request_slot *slot)\n-{\n-\tclosedown_active_slot(slot);\n-\tcurl_easy_getinfo(slot->curl, CURLINFO_HTTP_CODE, &slot->http_code);\n-\n-\tif (slot->finished != NULL)\n-\t\t(*slot->finished) = 1;\n-\n-\t/* Store slot results so they can be read after the slot is reused */\n-\tif (slot->results != NULL) {\n-\t\tslot->results->curl_result = slot->curl_result;\n-\t\tslot->results->http_code = slot->http_code;\n-#if LIBCURL_VERSION_NUM >= 0x070a08\n-\t\tcurl_easy_getinfo(slot->curl, CURLINFO_HTTPAUTH_AVAIL,\n-\t\t\t\t  &slot->results->auth_avail);\n-#else\n-\t\tslot->results->auth_avail = 0;\n-#endif\n-\t}\n-\n-\t/* Run callback if appropriate */\n-\tif (slot->callback_func != NULL)\n-\t\tslot->callback_func(slot->callback_data);\n-}\n-\n void finish_all_active_slots(void)\n {\n \tstruct active_request_slot *slot = active_queue_head;\n@@ -839,7 +839,7 @@ char *get_remote_object_url(const char *url, const char *hex,\n \treturn strbuf_detach(&buf, NULL);\n }\n \n-int handle_curl_result(struct slot_results *results)\n+static int handle_curl_result(struct slot_results *results)\n {\n \t/*\n \t * If we see a failing http code with CURLE_OK, we have turned off\ndiff --git a/http.h b/http.h\nindex 473179b..49afe39 100644\n--- a/http.h\n+++ b/http.h\n@@ -85,9 +85,7 @@ extern curlioerr ioctl_buffer(CURL *handle, int cmd, void *clientp);\n extern struct active_request_slot *get_active_slot(void);\n extern int start_active_slot(struct active_request_slot *slot);\n extern void run_active_slot(struct active_request_slot *slot);\n-extern void finish_active_slot(struct active_request_slot *slot);\n extern void finish_all_active_slots(void);\n-extern int handle_curl_result(struct slot_results *results);\n \n /*\n  * This will run one slot to completion in a blocking manner, similar to how\n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254708","messageId":"1421278855-8126-3-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"[PATCH 02/10] line-log.c: make line_log_data_init() static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:47Z","receivedAt":"2015-01-14T23:40:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"No external callers exist.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n line-log.c | 2 +-\n line-log.h | 2 --\n 2 files changed, 1 insertion(+), 3 deletions(-)\n\ndiff --git a/line-log.c b/line-log.c\nindex b7864ad..a490efe 100644\n--- a/line-log.c\n+++ b/line-log.c\n@@ -237,7 +237,7 @@ static void diff_ranges_release(struct diff_ranges *diff)\n \trange_set_release(&diff->target);\n }\n \n-void line_log_data_init(struct line_log_data *r)\n+static void line_log_data_init(struct line_log_data *r)\n {\n \tmemset(r, 0, sizeof(struct line_log_data));\n \trange_set_init(&r->ranges, 0);\ndiff --git a/line-log.h b/line-log.h\nindex a9212d8..7a5c24e 100644\n--- a/line-log.h\n+++ b/line-log.h\n@@ -54,8 +54,6 @@ struct line_log_data {\n \tstruct diff_ranges diff;\n };\n \n-extern void line_log_data_init(struct line_log_data *r);\n-\n extern void line_log_init(struct rev_info *rev, const char *prefix, struct string_list *args);\n \n extern int line_log_filter(struct rev_info *rev);\n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254707","messageId":"1421278855-8126-4-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"[PATCH 03/10] prompt.c: remove git_getpass() nobody uses","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:48Z","receivedAt":"2015-01-14T23:40:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Signed-off-by: Junio C Hamano <gitster@pobox.com>\n---\n prompt.c | 5 -----\n prompt.h | 1 -\n 2 files changed, 6 deletions(-)\n\ndiff --git a/prompt.c b/prompt.c\nindex 8181eeb..7540639 100644\n--- a/prompt.c\n+++ b/prompt.c\n@@ -73,8 +73,3 @@ char *git_prompt(const char *prompt, int flags)\n \t}\n \treturn r;\n }\n-\n-char *git_getpass(const char *prompt)\n-{\n-\treturn git_prompt(prompt, PROMPT_ASKPASS);\n-}\ndiff --git a/prompt.h b/prompt.h\nindex 04f321a..e04cced 100644\n--- a/prompt.h\n+++ b/prompt.h\n@@ -5,6 +5,5 @@\n #define PROMPT_ECHO    (1<<1)\n \n char *git_prompt(const char *prompt, int flags);\n-char *git_getpass(const char *prompt);\n \n #endif /* PROMPT_H */\n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254709","messageId":"1421278855-8126-5-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"[PATCH 04/10] revision.c: make save_parents() and free_saved_parents() static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:49Z","receivedAt":"2015-01-14T23:40:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"No external callers exist.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n revision.c | 106 ++++++++++++++++++++++++++++++++-----------------------------\n revision.h |  12 +++----\n 2 files changed, 59 insertions(+), 59 deletions(-)\n\ndiff --git a/revision.c b/revision.c\nindex 86406a2..0f4619c 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -2968,6 +2968,61 @@ enum commit_action get_commit_action(struct rev_info *revs, struct commit *commi\n \treturn commit_show;\n }\n \n+define_commit_slab(saved_parents, struct commit_list *);\n+\n+#define EMPTY_PARENT_LIST ((struct commit_list *)-1)\n+\n+/*\n+ * You may only call save_parents() once per commit (this is checked\n+ * for non-root commits).\n+ */\n+static void save_parents(struct rev_info *revs, struct commit *commit)\n+{\n+\tstruct commit_list **pp;\n+\n+\tif (!revs->saved_parents_slab) {\n+\t\trevs->saved_parents_slab = xmalloc(sizeof(struct saved_parents));\n+\t\tinit_saved_parents(revs->saved_parents_slab);\n+\t}\n+\n+\tpp = saved_parents_at(revs->saved_parents_slab, commit);\n+\n+\t/*\n+\t * When walking with reflogs, we may visit the same commit\n+\t * several times: once for each appearance in the reflog.\n+\t *\n+\t * In this case, save_parents() will be called multiple times.\n+\t * We want to keep only the first set of parents.  We need to\n+\t * store a sentinel value for an empty (i.e., NULL) parent\n+\t * list to distinguish it from a not-yet-saved list, however.\n+\t */\n+\tif (*pp)\n+\t\treturn;\n+\tif (commit->parents)\n+\t\t*pp = copy_commit_list(commit->parents);\n+\telse\n+\t\t*pp = EMPTY_PARENT_LIST;\n+}\n+\n+static void free_saved_parents(struct rev_info *revs)\n+{\n+\tif (revs->saved_parents_slab)\n+\t\tclear_saved_parents(revs->saved_parents_slab);\n+}\n+\n+struct commit_list *get_saved_parents(struct rev_info *revs, const struct commit *commit)\n+{\n+\tstruct commit_list *parents;\n+\n+\tif (!revs->saved_parents_slab)\n+\t\treturn commit->parents;\n+\n+\tparents = *saved_parents_at(revs->saved_parents_slab, commit);\n+\tif (parents == EMPTY_PARENT_LIST)\n+\t\treturn NULL;\n+\treturn parents;\n+}\n+\n enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit)\n {\n \tenum commit_action action = get_commit_action(revs, commit);\n@@ -3267,54 +3322,3 @@ void put_revision_mark(const struct rev_info *revs, const struct commit *commit)\n \tfputs(mark, stdout);\n \tputchar(' ');\n }\n-\n-define_commit_slab(saved_parents, struct commit_list *);\n-\n-#define EMPTY_PARENT_LIST ((struct commit_list *)-1)\n-\n-void save_parents(struct rev_info *revs, struct commit *commit)\n-{\n-\tstruct commit_list **pp;\n-\n-\tif (!revs->saved_parents_slab) {\n-\t\trevs->saved_parents_slab = xmalloc(sizeof(struct saved_parents));\n-\t\tinit_saved_parents(revs->saved_parents_slab);\n-\t}\n-\n-\tpp = saved_parents_at(revs->saved_parents_slab, commit);\n-\n-\t/*\n-\t * When walking with reflogs, we may visit the same commit\n-\t * several times: once for each appearance in the reflog.\n-\t *\n-\t * In this case, save_parents() will be called multiple times.\n-\t * We want to keep only the first set of parents.  We need to\n-\t * store a sentinel value for an empty (i.e., NULL) parent\n-\t * list to distinguish it from a not-yet-saved list, however.\n-\t */\n-\tif (*pp)\n-\t\treturn;\n-\tif (commit->parents)\n-\t\t*pp = copy_commit_list(commit->parents);\n-\telse\n-\t\t*pp = EMPTY_PARENT_LIST;\n-}\n-\n-struct commit_list *get_saved_parents(struct rev_info *revs, const struct commit *commit)\n-{\n-\tstruct commit_list *parents;\n-\n-\tif (!revs->saved_parents_slab)\n-\t\treturn commit->parents;\n-\n-\tparents = *saved_parents_at(revs->saved_parents_slab, commit);\n-\tif (parents == EMPTY_PARENT_LIST)\n-\t\treturn NULL;\n-\treturn parents;\n-}\n-\n-void free_saved_parents(struct rev_info *revs)\n-{\n-\tif (revs->saved_parents_slab)\n-\t\tclear_saved_parents(revs->saved_parents_slab);\n-}\ndiff --git a/revision.h b/revision.h\nindex 033a244..07807e5 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -298,18 +298,14 @@ extern int rewrite_parents(struct rev_info *revs, struct commit *commit,\n \trewrite_parent_fn_t rewrite_parent);\n \n /*\n- * Save a copy of the parent list, and return the saved copy.  This is\n- * used by the log machinery to retrieve the original parents when\n- * commit->parents has been modified by history simpification.\n- *\n- * You may only call save_parents() once per commit (this is checked\n- * for non-root commits).\n+ * The log machinery saves the original parent list so that\n+ * get_saved_parents() can later tell what the real parents of the\n+ * commits are, when commit->parents has been modified by history\n+ * simpification.\n  *\n  * get_saved_parents() will transparently return commit->parents if\n  * history simplification is off.\n  */\n-extern void save_parents(struct rev_info *revs, struct commit *commit);\n extern struct commit_list *get_saved_parents(struct rev_info *revs, const struct commit *commit);\n-extern void free_saved_parents(struct rev_info *revs);\n \n #endif\n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254710","messageId":"1421278855-8126-6-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"[PATCH 05/10] urlmatch.c: make match_urls() static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:50Z","receivedAt":"2015-01-14T23:40:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"No external callers exist.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n urlmatch.c | 6 +++---\n urlmatch.h | 1 -\n 2 files changed, 3 insertions(+), 4 deletions(-)\n\ndiff --git a/urlmatch.c b/urlmatch.c\nindex 618d216..132d342 100644\n--- a/urlmatch.c\n+++ b/urlmatch.c\n@@ -412,9 +412,9 @@ static size_t url_match_prefix(const char *url,\n \treturn 0;\n }\n \n-int match_urls(const struct url_info *url,\n-\t       const struct url_info *url_prefix,\n-\t       int *exactusermatch)\n+static int match_urls(const struct url_info *url,\n+\t\t      const struct url_info *url_prefix,\n+\t\t      int *exactusermatch)\n {\n \t/*\n \t * url_prefix matches url if the scheme, host and port of url_prefix\ndiff --git a/urlmatch.h b/urlmatch.h\nindex b461dfd..528862a 100644\n--- a/urlmatch.h\n+++ b/urlmatch.h\n@@ -31,7 +31,6 @@ struct url_info {\n };\n \n extern char *url_normalize(const char *, struct url_info *);\n-extern int match_urls(const struct url_info *url, const struct url_info *url_prefix, int *exactusermatch);\n \n struct urlmatch_item {\n \tsize_t matched_len;\n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254711","messageId":"1421278855-8126-7-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"[PATCH 06/10] remote.c: make clear_cas_option() static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:51Z","receivedAt":"2015-01-14T23:40:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"No external callers exist.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n remote.c | 2 +-\n remote.h | 1 -\n 2 files changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/remote.c b/remote.c\nindex 5b9c693..0b3939c 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -2156,7 +2156,7 @@ struct ref *get_stale_heads(struct refspec *refs, int ref_count, struct ref *fet\n /*\n  * Compare-and-swap\n  */\n-void clear_cas_option(struct push_cas_option *cas)\n+static void clear_cas_option(struct push_cas_option *cas)\n {\n \tint i;\n \ndiff --git a/remote.h b/remote.h\nindex 8b62efd..31ccdcd 100644\n--- a/remote.h\n+++ b/remote.h\n@@ -260,7 +260,6 @@ struct push_cas_option {\n \n extern int parseopt_push_cas_option(const struct option *, const char *arg, int unset);\n extern int parse_push_cas_option(struct push_cas_option *, const char *arg, int unset);\n-extern void clear_cas_option(struct push_cas_option *);\n \n extern int is_empty_cas(const struct push_cas_option *);\n void apply_push_cas(struct push_cas_option *, struct remote *, struct ref *);\n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254712","messageId":"1421278855-8126-8-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"[PATCH 07/10] shallow.c: make check_shallow_file_for_update() static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:52Z","receivedAt":"2015-01-14T23:40:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"No external callers exist.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n commit.h  | 1 -\n shallow.c | 2 +-\n 2 files changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/commit.h b/commit.h\nindex 5cc1e7e..9f189cb 100644\n--- a/commit.h\n+++ b/commit.h\n@@ -254,7 +254,6 @@ extern int for_each_commit_graft(each_commit_graft_fn, void *);\n extern int is_repository_shallow(void);\n extern struct commit_list *get_shallow_commits(struct object_array *heads,\n \t\tint depth, int shallow_flag, int not_shallow_flag);\n-extern void check_shallow_file_for_update(void);\n extern void set_alternate_shallow_file(const char *path, int override);\n extern int write_shallow_commits(struct strbuf *out, int use_pack_protocol,\n \t\t\t\t const struct sha1_array *extra);\ndiff --git a/shallow.c b/shallow.c\nindex cdd0775..04ea816 100644\n--- a/shallow.c\n+++ b/shallow.c\n@@ -137,7 +137,7 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,\n \treturn result;\n }\n \n-void check_shallow_file_for_update(void)\n+static void check_shallow_file_for_update(void)\n {\n \tif (is_shallow == -1)\n \t\tdie(\"BUG: shallow must be initialized by now\");\n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254713","messageId":"1421278855-8126-9-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"[PATCH 08/10] pack-bitmap.c: make pack_bitmap_filename() static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:53Z","receivedAt":"2015-01-14T23:40:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Signed-off-by: Junio C Hamano <gitster@pobox.com>\n---\n pack-bitmap.c | 28 ++++++++++++++--------------\n pack-bitmap.h |  1 -\n 2 files changed, 14 insertions(+), 15 deletions(-)\n\ndiff --git a/pack-bitmap.c b/pack-bitmap.c\nindex 6a81841..0cd85f6 100644\n--- a/pack-bitmap.c\n+++ b/pack-bitmap.c\n@@ -252,6 +252,20 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)\n \treturn 0;\n }\n \n+static char *pack_bitmap_filename(struct packed_git *p)\n+{\n+\tchar *idx_name;\n+\tint len;\n+\n+\tlen = strlen(p->pack_name) - strlen(\".pack\");\n+\tidx_name = xmalloc(len + strlen(\".bitmap\") + 1);\n+\n+\tmemcpy(idx_name, p->pack_name, len);\n+\tmemcpy(idx_name + len, \".bitmap\", strlen(\".bitmap\") + 1);\n+\n+\treturn idx_name;\n+}\n+\n static int open_pack_bitmap_1(struct packed_git *packfile)\n {\n \tint fd;\n@@ -322,20 +336,6 @@ failed:\n \treturn -1;\n }\n \n-char *pack_bitmap_filename(struct packed_git *p)\n-{\n-\tchar *idx_name;\n-\tint len;\n-\n-\tlen = strlen(p->pack_name) - strlen(\".pack\");\n-\tidx_name = xmalloc(len + strlen(\".bitmap\") + 1);\n-\n-\tmemcpy(idx_name, p->pack_name, len);\n-\tmemcpy(idx_name + len, \".bitmap\", strlen(\".bitmap\") + 1);\n-\n-\treturn idx_name;\n-}\n-\n static int open_pack_bitmap(void)\n {\n \tstruct packed_git *p;\ndiff --git a/pack-bitmap.h b/pack-bitmap.h\nindex 487600b..0adcef7 100644\n--- a/pack-bitmap.h\n+++ b/pack-bitmap.h\n@@ -38,7 +38,6 @@ int prepare_bitmap_git(void);\n void count_bitmap_commit_list(uint32_t *commits, uint32_t *trees, uint32_t *blobs, uint32_t *tags);\n void traverse_bitmap_commit_list(show_reachable_fn show_reachable);\n void test_bitmap_walk(struct rev_info *revs);\n-char *pack_bitmap_filename(struct packed_git *p);\n int prepare_bitmap_walk(struct rev_info *revs);\n int reuse_partial_packfile_from_bitmap(struct packed_git **packfile, uint32_t *entries, off_t *up_to);\n int rebuild_existing_bitmaps(struct packing_data *mapping, khash_sha1 *reused_bitmaps, int show_progress);\n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254714","messageId":"1421278855-8126-10-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"[PATCH 09/10] read-cache.c: make fill/match_stat_data() static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:54Z","receivedAt":"2015-01-14T23:40:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Signed-off-by: Junio C Hamano <gitster@pobox.com>\n---\n cache.h      | 14 --------------\n read-cache.c | 14 ++++++++++++--\n 2 files changed, 12 insertions(+), 16 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex f704af5..98911c8 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -539,20 +539,6 @@ extern int ie_modified(const struct index_state *, const struct cache_entry *, s\n extern int index_fd(unsigned char *sha1, int fd, struct stat *st, enum object_type type, const char *path, unsigned flags);\n extern int index_path(unsigned char *sha1, const char *path, struct stat *st, unsigned flags);\n \n-/*\n- * Record to sd the data from st that we use to check whether a file\n- * might have changed.\n- */\n-extern void fill_stat_data(struct stat_data *sd, struct stat *st);\n-\n-/*\n- * Return 0 if st is consistent with a file not having been changed\n- * since sd was filled.  If there are differences, return a\n- * combination of MTIME_CHANGED, CTIME_CHANGED, OWNER_CHANGED,\n- * INODE_CHANGED, and DATA_CHANGED.\n- */\n-extern int match_stat_data(const struct stat_data *sd, struct stat *st);\n-\n extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);\n \n #define REFRESH_REALLY\t\t0x0001\t/* ignore_valid */\ndiff --git a/read-cache.c b/read-cache.c\nindex 9cff715..5a71de1 100644\n--- a/read-cache.c\n+++ b/read-cache.c\n@@ -83,7 +83,11 @@ void rename_index_entry_at(struct index_state *istate, int nr, const char *new_n\n \tadd_index_entry(istate, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);\n }\n \n-void fill_stat_data(struct stat_data *sd, struct stat *st)\n+/*\n+ * Record to sd the data from st that we use to check whether a file\n+ * might have changed.\n+ */\n+static void fill_stat_data(struct stat_data *sd, struct stat *st)\n {\n \tsd->sd_ctime.sec = (unsigned int)st->st_ctime;\n \tsd->sd_mtime.sec = (unsigned int)st->st_mtime;\n@@ -96,7 +100,13 @@ void fill_stat_data(struct stat_data *sd, struct stat *st)\n \tsd->sd_size = st->st_size;\n }\n \n-int match_stat_data(const struct stat_data *sd, struct stat *st)\n+/*\n+ * Return 0 if st is consistent with a file not having been changed\n+ * since sd was filled.  If there are differences, return a\n+ * combination of MTIME_CHANGED, CTIME_CHANGED, OWNER_CHANGED,\n+ * INODE_CHANGED, and DATA_CHANGED.\n+ */\n+static int match_stat_data(const struct stat_data *sd, struct stat *st)\n {\n \tint changed = 0;\n \n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254715","messageId":"1421278855-8126-11-git-send-email-gitster@pobox.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"[PATCH 10/10] commit: show \"Author:\" hint when the ident is not given explicitly","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T23:40:55Z","receivedAt":"2015-01-14T23:40:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This is a knee-jerk response to two facts:\n\n - the author_ident_sufficiently_given() function is public but\n   nobody uses it;\n\n - a corresponding function committer_ident_sufficiently_given() is\n   used to determine when to add \"Committer: \" reminder in the log\n   message editor.\n\nThe existing logic decides to show \"Author:\" reminder when the\nauthor is different from the committer, so there won't be practical\ndifference other than we would end up showing both reminders when a\ncommitter with iffy name derived from the heuristic is committing\nher own patch.\n\nWhich means this patch probably should be dropped.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/commit.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 7d90c35..b512504 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -847,7 +847,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t\tassert_split_ident(&ai, author_ident);\n \t\tassert_split_ident(&ci, &committer_ident);\n \n-\t\tif (ident_cmp(&ai, &ci))\n+\t\tif (ident_cmp(&ai, &ci) ||\n+\t\t    !author_ident_sufficiently_given())\n \t\t\tstatus_printf_ln(s, GIT_COLOR_NORMAL,\n \t\t\t\t_(\"%s\"\n \t\t\t\t\"Author:    %.*s <%.*s>\"),\n@@ -1440,7 +1441,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1,\n \n \tformat_commit_message(commit, \"%an <%ae>\", &author_ident, &pctx);\n \tformat_commit_message(commit, \"%cn <%ce>\", &committer_ident, &pctx);\n-\tif (strbuf_cmp(&author_ident, &committer_ident)) {\n+\tif (strbuf_cmp(&author_ident, &committer_ident) ||\n+\t    !author_ident_sufficiently_given()) {\n \t\tstrbuf_addstr(&format, \"\\n Author: \");\n \t\tstrbuf_addbuf_percentquote(&format, &author_ident);\n \t}\n-- \n2.3.0-rc0-134-g109a908\n"},{"id":"254717","messageId":"CAGZ79kZbMPKg0ML9Megnpa3UfADdd5UkQOCLn+oFf+W41q2n2Q@mail.gmail.com","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 00/10] mark private symbols static","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-01-15T00:07:34Z","receivedAt":"2015-01-15T00:07:34Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"Regarding patch 1 - 9:\nReviewed-by: Stefan Beller <sbeller@google.com>\nfor what it's worth.\n"},{"id":"254725","messageId":"20150115064113.GB11028@peff.net","threadId":"38364","inReplyTo":"1421278855-8126-2-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 01/10] http.c: make finish_active_slot() and handle_curl_result() static","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-15T06:41:13Z","receivedAt":"2015-01-15T06:41:13Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 14, 2015 at 03:40:46PM -0800, Junio C Hamano wrote:\n\n> No external callers exist.\n\nI think this is sensible. They used to be used directly by remote-curl.c\nfor the smart-http protocol. But they got wrapped by run_one_slot in\nbeed336 (http: never use curl_easy_perform, 2014-02-18). And I'd expect\nany future users to follow that route.\n\n-Peff\n"},{"id":"254726","messageId":"20150115064734.GC11028@peff.net","threadId":"38364","inReplyTo":"1421278855-8126-4-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 03/10] prompt.c: remove git_getpass() nobody uses","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-15T06:47:34Z","receivedAt":"2015-01-15T06:47:34Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 14, 2015 at 03:40:48PM -0800, Junio C Hamano wrote:\n\n> -char *git_getpass(const char *prompt)\n> -{\n> -\treturn git_prompt(prompt, PROMPT_ASKPASS);\n> -}\n\nYay. This was whittled down to a compatibility wrapper around the more\nflexible git_prompt, waiting for the final callers to go away. That\nhappened in 791643a8, when imap-send learned to use the credential\ninterface.\n\n-Peff\n"},{"id":"254727","messageId":"20150115064939.GD11028@peff.net","threadId":"38364","inReplyTo":"1421278855-8126-6-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 05/10] urlmatch.c: make match_urls() static","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-15T06:49:39Z","receivedAt":"2015-01-15T06:49:39Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 14, 2015 at 03:40:50PM -0800, Junio C Hamano wrote:\n\n> No external callers exist.\n\nI think there was some notion that we might use this elsewhere (e.g., to\nharmonize the credential.* and http.* config matching  rules). But I do\nnot have any plans to work on that soon, and I am not even sure what\ninterface would be needed, so it's reasonable to make this static in the\ninterim.\n\n-Peff\n"},{"id":"254728","messageId":"20150115065134.GE11028@peff.net","threadId":"38364","inReplyTo":"1421278855-8126-9-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 08/10] pack-bitmap.c: make pack_bitmap_filename() static","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-15T06:51:35Z","receivedAt":"2015-01-15T06:51:35Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 14, 2015 at 03:40:53PM -0800, Junio C Hamano wrote:\n\n>  pack-bitmap.c | 28 ++++++++++++++--------------\n>  pack-bitmap.h |  1 -\n>  2 files changed, 14 insertions(+), 15 deletions(-)\n\nLooks good. I have some other not-yet-public bitmap stuff to send\npending cleanup and testing, but I checked and none of it cares about\nthis function.\n\n-Peff\n"},{"id":"254730","messageId":"20150115071743.GF11028@peff.net","threadId":"38364","inReplyTo":"1421278855-8126-11-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 10/10] commit: show \"Author:\" hint when the ident is not given explicitly","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-15T07:17:43Z","receivedAt":"2015-01-15T07:17:43Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 14, 2015 at 03:40:55PM -0800, Junio C Hamano wrote:\n\n> This is a knee-jerk response to two facts:\n> \n>  - the author_ident_sufficiently_given() function is public but\n>    nobody uses it;\n> \n>  - a corresponding function committer_ident_sufficiently_given() is\n>    used to determine when to add \"Committer: \" reminder in the log\n>    message editor.\n> \n> The existing logic decides to show \"Author:\" reminder when the\n> author is different from the committer, so there won't be practical\n> difference other than we would end up showing both reminders when a\n> committer with iffy name derived from the heuristic is committing\n> her own patch.\n> \n> Which means this patch probably should be dropped.\n\nYeah, I seem to recall going through this logic myself recently and\ncoming to the same conclusion (probably while working on fac9083). I\ndon't think it is really adding anything to the one case where it\ntriggers (and in fact looks a bit worse, as the author information is\nredundant).\n\n-Peff\n"},{"id":"254731","messageId":"20150115071827.GG11028@peff.net","threadId":"38364","inReplyTo":"1421278855-8126-1-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 00/10] mark private symbols static","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-15T07:18:27Z","receivedAt":"2015-01-15T07:18:27Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 14, 2015 at 03:40:45PM -0800, Junio C Hamano wrote:\n\n> Here are a handful of patches to make symbols that are only used\n> within a .c file as static.  This is not the kind of changes we\n> would want to do in the pre-release freeze period, and it is just\n> for reference.  I may later come back to them after 2.3 final is\n> tagged.\n\nI commented specifically on the ones that are in areas I touch a lot,\nbut all of them look fine to me.\n\n-Peff\n"},{"id":"254759","messageId":"xmqqzj9k6iel.fsf@gitster.dls.corp.google.com","threadId":"38364","inReplyTo":"20150115071827.GG11028@peff.net","subject":"Re: [PATCH 00/10] mark private symbols static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-15T17:52:18Z","receivedAt":"2015-01-15T17:52:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Wed, Jan 14, 2015 at 03:40:45PM -0800, Junio C Hamano wrote:\n>\n>> Here are a handful of patches to make symbols that are only used\n>> within a .c file as static.  This is not the kind of changes we\n>> would want to do in the pre-release freeze period, and it is just\n>> for reference.  I may later come back to them after 2.3 final is\n>> tagged.\n>\n> I commented specifically on the ones that are in areas I touch a lot,\n> but all of them look fine to me.\n\nThanks for reviews.\n\nThe primary reason I sent out this series was to show the reasoning\nin 00/10 to decide what *not* to touch, by the way, to send a signal\nto those who may want to throw unnecessary churn at the codebase, by\nthe way ;-)\n"}]}