{"thread":{"id":"22177","subject":"[PATCH 04/18] date.c: mark file-local function static","startedAt":"2010-01-12T07:52:43Z","lastAt":"2010-01-13T06:56:24Z","messageCount":24,"participants":["Junio C Hamano","Johannes Sixt","Daniel Barkalow"],"isPatch":true,"patchVersion":1,"patchTotal":18},"messages":[{"id":"131350","messageId":"1263282781-25596-1-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":null,"subject":"[PATCH 00/18] mark file-local symbols static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:43Z","receivedAt":"2010-01-12T07:52:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The early part of the series up to [PATCH 12/18] are uncontroversial; they\nall change \"extern\" symbols that are not used outside of the file they are\ndefined in to \"static\".\n\nThe remainder remove functions that are not called from anywhere.  While\nthe result of applying these patches still compiles, I find removal of\nsome are iffy:\n\n * map_email(), has_pack_file() and strbuf_tolower() are not even\n   documented.  They should go.  It is trivial to reimplement them when a\n   new caller needs it.\n\n * Even though parse_blob() in blob.c is never called, it is part of the\n   \"object layer\" suite that consistently defines their initializers as\n   parse_$type().  But it has never been called by anybody since its\n   inception at a510bfa (Mark blobs as parsed when they're actually\n   parsed, 2005-04-28).\n\n   By the way, Documentation/technical/api-object-access.txt needs some\n   love.\n\n * object_list_append() and object_list_length() in object.c do not have\n   any callers, and they are implementations of rather inefficient API.\n   Perhaps they should go.\n\n * I am a bit worried about nobody calling invalidate_lstat_cache() and\n   clear_lstat_cache().  Kjetil introduced them in aeabab5 (lstat_cache():\n   introduce invalidate_lstat_cache() function, 2009-01-18) and bda6eb0\n   (lstat_cache(): introduce clear_lstat_cache() function, 2009-01-18)\n   respectively but as far as I can tell there wasn't any user of these\n   functions, ever.  They may be broken and nobody knew they were as\n   nothing calls them, but more importantly it could be that some existing\n   codepaths aren't calling them when they should.\n\nIn this series, I am not removing alloc_report(), print_string_list(), and\nunsorted_string_list_has_string().  Among these three, the first two are\nclearly for debugging and the latter two are documented interfaces, even\nthough nobody uses them.\n\nI've made sure that they apply to 'master', 'next' and 'pu' (application\nto 'pu' has two conflicts that are trivial in 04/18 and 08/18) and the\nresult compiles.\n\nJunio C Hamano (18):\n  bisect.c: mark file-local function static\n  builtin-rev-list.c: mark file-local function static\n  pretty.c: mark file-local function static\n  date.c: mark file-local function static\n  http.c: mark file-local functions static\n  entry.c: mark file-local function static\n  parse-options.c: mark file-local function static\n  read-cache.c: mark file-local functions static\n  remote-curl.c: mark file-local function static\n  quote.c: mark file-local function static\n  submodule.c: mark file-local function static\n  utf8.c: mark file-local function static\n  mailmap.c: remove unused function\n  sha1_file.c: remove unused function\n  strbuf.c: remove unused function\n  blob.c: remove unused function\n  object.c: remove unused functions\n  symlinks.c: remove unused functions\n\n bisect.c           |    2 +-\n bisect.h           |    2 --\n blob.c             |   21 ---------------------\n blob.h             |    2 --\n builtin-rev-list.c |    2 +-\n cache.h            |    8 --------\n commit.h           |    1 -\n date.c             |    2 +-\n entry.c            |    2 +-\n git-compat-util.h  |    1 -\n http.c             |   10 ++++++++--\n http.h             |    9 ---------\n mailmap.c          |    5 -----\n mailmap.h          |    1 -\n object.c           |   21 ---------------------\n object.h           |    5 -----\n parse-options.c    |    7 +++++--\n parse-options.h    |    3 ---\n pretty.c           |    2 +-\n quote.c            |    2 +-\n quote.h            |    1 -\n read-cache.c       |    6 ++++--\n remote-curl.c      |    2 +-\n sha1_file.c        |    8 --------\n strbuf.c           |    7 -------\n strbuf.h           |    1 -\n submodule.c        |    2 +-\n symlinks.c         |   31 -------------------------------\n utf8.c             |    2 +-\n utf8.h             |    1 -\n 30 files changed, 26 insertions(+), 143 deletions(-)\n"},{"id":"131349","messageId":"1263282781-25596-2-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 01/18] bisect.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:44Z","receivedAt":"2010-01-12T07:52:44Z","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 bisect.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/bisect.c b/bisect.c\nindex f1a1f84..5c03398 100644\n--- a/bisect.c\n+++ b/bisect.c\n@@ -593,7 +593,7 @@ struct commit_list *filter_skipped(struct commit_list *list,\n  * is increased by one between each call, but that should not matter\n  * for this application.\n  */\n-int get_prn(int count) {\n+static int get_prn(int count) {\n \tcount = count * 1103515245 + 12345;\n \treturn ((unsigned)(count/65536) % PRN_MODULO);\n }\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131344","messageId":"1263282781-25596-3-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 02/18] builtin-rev-list.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:45Z","receivedAt":"2010-01-12T07:52:45Z","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 bisect.h           |    2 --\n builtin-rev-list.c |    2 +-\n 2 files changed, 1 insertions(+), 3 deletions(-)\n\ndiff --git a/bisect.h b/bisect.h\nindex 82f8fc1..0862ce5 100644\n--- a/bisect.h\n+++ b/bisect.h\n@@ -27,8 +27,6 @@ struct rev_list_info {\n \tconst char *header_prefix;\n };\n \n-extern int show_bisect_vars(struct rev_list_info *info, int reaches, int all);\n-\n extern int bisect_next_all(const char *prefix);\n \n extern int estimate_bisect_steps(int all);\ndiff --git a/builtin-rev-list.c b/builtin-rev-list.c\nindex cd97ded..c924b3a 100644\n--- a/builtin-rev-list.c\n+++ b/builtin-rev-list.c\n@@ -253,7 +253,7 @@ static void print_var_int(const char *var, int val)\n \tprintf(\"%s=%d\\n\", var, val);\n }\n \n-int show_bisect_vars(struct rev_list_info *info, int reaches, int all)\n+static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)\n {\n \tint cnt, flags = info->bisect_show_flags;\n \tchar hex[41] = \"\";\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131341","messageId":"1263282781-25596-4-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 03/18] pretty.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:46Z","receivedAt":"2010-01-12T07:52:46Z","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 commit.h |    1 -\n pretty.c |    2 +-\n 2 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/commit.h b/commit.h\nindex e5332ef..24128d7 100644\n--- a/commit.h\n+++ b/commit.h\n@@ -73,7 +73,6 @@ struct pretty_print_context\n \tstruct reflog_walk_info *reflog_info;\n };\n \n-extern int non_ascii(int);\n extern int has_non_ascii(const char *text);\n struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */\n extern char *reencode_commit_message(const struct commit *commit,\ndiff --git a/pretty.c b/pretty.c\nindex 8f5bd1a..9001379 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -83,7 +83,7 @@ static int get_one_line(const char *msg)\n }\n \n /* High bit set, or ISO-2022-INT */\n-int non_ascii(int ch)\n+static int non_ascii(int ch)\n {\n \treturn !isascii(ch) || ch == '\\033';\n }\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131335","messageId":"1263282781-25596-5-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 04/18] date.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:47Z","receivedAt":"2010-01-12T07:52:47Z","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\n * Has a trivial conflict in git-compat-util.h when applyed to 'pu'\n\n date.c            |    2 +-\n git-compat-util.h |    1 -\n 2 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/date.c b/date.c\nindex 5d05ef6..45f3684 100644\n--- a/date.c\n+++ b/date.c\n@@ -9,7 +9,7 @@\n /*\n  * This is like mktime, but without normalization of tm_wday and tm_yday.\n  */\n-time_t tm_to_time_t(const struct tm *tm)\n+static time_t tm_to_time_t(const struct tm *tm)\n {\n \tstatic const int mdays[] = {\n \t    0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 5c59687..85dea12 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -198,7 +198,6 @@ extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)))\n extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));\n \n extern int prefixcmp(const char *str, const char *prefix);\n-extern time_t tm_to_time_t(const struct tm *tm);\n \n static inline const char *skip_prefix(const char *str, const char *prefix)\n {\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131347","messageId":"1263282781-25596-6-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 05/18] http.c: mark file-local functions static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:48Z","receivedAt":"2010-01-12T07:52: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 http.c |   10 ++++++++--\n http.h |    9 ---------\n 2 files changed, 8 insertions(+), 11 deletions(-)\n\ndiff --git a/http.c b/http.c\nindex 5c3efb9..deab595 100644\n--- a/http.c\n+++ b/http.c\n@@ -651,7 +651,7 @@ static void closedown_active_slot(struct active_request_slot *slot)\n \tslot->in_use = 0;\n }\n \n-void release_active_slot(struct active_request_slot *slot)\n+static void release_active_slot(struct active_request_slot *slot)\n {\n \tclosedown_active_slot(slot);\n \tif (slot->curl && curl_session_count > min_curl_sessions) {\n@@ -834,7 +834,13 @@ int http_get_strbuf(const char *url, struct strbuf *result, int options)\n \treturn http_request(url, result, HTTP_REQUEST_STRBUF, options);\n }\n \n-int http_get_file(const char *url, const char *filename, int options)\n+/*\n+ * Downloads an url and stores the result in the given file.\n+ *\n+ * If a previous interrupted download is detected (i.e. a previous temporary\n+ * file is still around) the download is resumed.\n+ */\n+static int http_get_file(const char *url, const char *filename, int options)\n {\n \tint ret;\n \tstruct strbuf tmpfile = STRBUF_INIT;\ndiff --git a/http.h b/http.h\nindex f828e1d..5c9441c 100644\n--- a/http.h\n+++ b/http.h\n@@ -81,7 +81,6 @@ 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 void release_active_slot(struct active_request_slot *slot);\n \n #ifdef USE_CURL_MULTI\n extern void fill_active_slots(void);\n@@ -136,14 +135,6 @@ extern char *get_remote_object_url(const char *url, const char *hex,\n int http_get_strbuf(const char *url, struct strbuf *result, int options);\n \n /*\n- * Downloads an url and stores the result in the given file.\n- *\n- * If a previous interrupted download is detected (i.e. a previous temporary\n- * file is still around) the download is resumed.\n- */\n-int http_get_file(const char *url, const char *filename, int options);\n-\n-/*\n  * Prints an error message using error() containing url and curl_errorstr,\n  * and returns ret.\n  */\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131348","messageId":"1263282781-25596-7-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 06/18] entry.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:49Z","receivedAt":"2010-01-12T07:52:49Z","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 |    3 ---\n entry.c |    2 +-\n 2 files changed, 1 insertions(+), 4 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex 3f9ee86..30b9048 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -473,9 +473,6 @@ extern int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_obje\n extern int index_path(unsigned char *sha1, const char *path, struct stat *st, int write_object);\n extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);\n \n-/* \"careful lstat()\" */\n-extern int check_path(const char *path, int len, struct stat *st, int skiplen);\n-\n #define REFRESH_REALLY\t\t0x0001\t/* ignore_valid */\n #define REFRESH_UNMERGED\t0x0002\t/* allow unmerged */\n #define REFRESH_QUIET\t\t0x0004\t/* be quiet about it */\ndiff --git a/entry.c b/entry.c\nindex 06d24f1..55b988e 100644\n--- a/entry.c\n+++ b/entry.c\n@@ -179,7 +179,7 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout\n  * This is like 'lstat()', except it refuses to follow symlinks\n  * in the path, after skipping \"skiplen\".\n  */\n-int check_path(const char *path, int len, struct stat *st, int skiplen)\n+static int check_path(const char *path, int len, struct stat *st, int skiplen)\n {\n \tconst char *slash = path + len;\n \n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131352","messageId":"1263282781-25596-8-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 07/18] parse-options.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:50Z","receivedAt":"2010-01-12T07:52:50Z","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 parse-options.c |    7 +++++--\n parse-options.h |    3 ---\n 2 files changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/parse-options.c b/parse-options.c\nindex f559411..7bbed5f 100644\n--- a/parse-options.c\n+++ b/parse-options.c\n@@ -3,6 +3,9 @@\n #include \"cache.h\"\n #include \"commit.h\"\n \n+static int parse_options_usage(const char * const *usagestr,\n+\t\t\t       const struct option *opts);\n+\n #define OPT_SHORT 1\n #define OPT_UNSET 2\n \n@@ -560,8 +563,8 @@ void usage_msg_opt(const char *msg,\n \tusage_with_options(usagestr, options);\n }\n \n-int parse_options_usage(const char * const *usagestr,\n-\t\t\tconst struct option *opts)\n+static int parse_options_usage(const char * const *usagestr,\n+\t\t\t       const struct option *opts)\n {\n \treturn usage_with_options_internal(usagestr, opts, 0);\n }\ndiff --git a/parse-options.h b/parse-options.h\nindex f295a2c..72fa360 100644\n--- a/parse-options.h\n+++ b/parse-options.h\n@@ -171,9 +171,6 @@ struct parse_opt_ctx_t {\n \tconst char *prefix;\n };\n \n-extern int parse_options_usage(const char * const *usagestr,\n-\t\t\t       const struct option *opts);\n-\n extern void parse_options_start(struct parse_opt_ctx_t *ctx,\n \t\t\t\tint argc, const char **argv, const char *prefix,\n \t\t\t\tint flags);\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131345","messageId":"1263282781-25596-9-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 08/18] read-cache.c: mark file-local functions static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:51Z","receivedAt":"2010-01-12T07:52:51Z","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\n * has conflicts when applied to 'pu' but nothing \"am -3\" cannot fix.\n * remove_index_entry_at() is left exported even though it can become\n   static in 'master'; it is used in 'pu'.\n\n cache.h      |    2 --\n read-cache.c |    6 ++++--\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex 30b9048..e7bb6b7 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -445,7 +445,6 @@ extern int index_name_pos(const struct index_state *, const char *name, int name\n #define ADD_CACHE_JUST_APPEND 8\t\t/* Append only; tree.c::read_tree() */\n #define ADD_CACHE_NEW_ONLY 16\t\t/* Do not replace existing ones */\n extern int add_index_entry(struct index_state *, struct cache_entry *ce, int option);\n-extern struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int really);\n extern void rename_index_entry_at(struct index_state *, int pos, const char *new_name);\n extern int remove_index_entry_at(struct index_state *, int pos);\n extern void remove_marked_cache_entries(struct index_state *istate);\n@@ -615,7 +614,6 @@ static inline void hashclr(unsigned char *hash)\n {\n \tmemset(hash, 0, 20);\n }\n-extern int is_empty_blob_sha1(const unsigned char *sha1);\n \n #define EMPTY_TREE_SHA1_HEX \\\n \t\"4b825dc642cb6eb9a060e54bf8d69288fbee4904\"\ndiff --git a/read-cache.c b/read-cache.c\nindex 9033dd3..9f4f44c 100644\n--- a/read-cache.c\n+++ b/read-cache.c\n@@ -15,6 +15,8 @@\n #include \"revision.h\"\n #include \"blob.h\"\n \n+static struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int really);\n+\n /* Index extensions.\n  *\n  * The first letter should be 'A'..'Z' for extensions that are not\n@@ -156,7 +158,7 @@ static int ce_modified_check_fs(struct cache_entry *ce, struct stat *st)\n \treturn 0;\n }\n \n-int is_empty_blob_sha1(const unsigned char *sha1)\n+static int is_empty_blob_sha1(const unsigned char *sha1)\n {\n \tstatic const unsigned char empty_blob_sha1[20] = {\n \t\t0xe6,0x9d,0xe2,0x9b,0xb2,0xd1,0xd6,0x43,0x4b,0x8b,\n@@ -1141,7 +1143,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, const char **p\n \treturn has_errors;\n }\n \n-struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int really)\n+static struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int really)\n {\n \treturn refresh_cache_ent(&the_index, ce, really, NULL);\n }\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131339","messageId":"1263282781-25596-10-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 09/18] remote-curl.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:52Z","receivedAt":"2010-01-12T07:52:52Z","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 remote-curl.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/remote-curl.c b/remote-curl.c\nindex 28b2a31..b76dcb2 100644\n--- a/remote-curl.c\n+++ b/remote-curl.c\n@@ -317,7 +317,7 @@ static size_t rpc_out(void *ptr, size_t eltsize,\n }\n \n #ifndef NO_CURL_IOCTL\n-curlioerr rpc_ioctl(CURL *handle, int cmd, void *clientp)\n+static curlioerr rpc_ioctl(CURL *handle, int cmd, void *clientp)\n {\n \tstruct rpc_state *rpc = clientp;\n \n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131337","messageId":"1263282781-25596-11-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 10/18] quote.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:53Z","receivedAt":"2010-01-12T07:52: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 quote.c |    2 +-\n quote.h |    1 -\n 2 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/quote.c b/quote.c\nindex 848d174..acb6bf9 100644\n--- a/quote.c\n+++ b/quote.c\n@@ -72,7 +72,7 @@ void sq_quote_argv(struct strbuf *dst, const char** argv, size_t maxlen)\n \t}\n }\n \n-char *sq_dequote_step(char *arg, char **next)\n+static char *sq_dequote_step(char *arg, char **next)\n {\n \tchar *dst = arg;\n \tchar *src = arg;\ndiff --git a/quote.h b/quote.h\nindex 66730f2..f83eb23 100644\n--- a/quote.h\n+++ b/quote.h\n@@ -45,7 +45,6 @@ extern char *sq_dequote(char *);\n  * next argument that should be passed as first parameter. When there\n  * is no more argument to be dequoted, \"next\" is updated to point to NULL.\n  */\n-extern char *sq_dequote_step(char *arg, char **next);\n extern int sq_dequote_to_argv(char *arg, const char ***argv, int *nr, int *alloc);\n \n extern int unquote_c_style(struct strbuf *, const char *quoted, const char **endp);\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131353","messageId":"1263282781-25596-12-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 11/18] submodule.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:54Z","receivedAt":"2010-01-12T07:52: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 submodule.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/submodule.c b/submodule.c\nindex 86aad65..3007f7d 100644\n--- a/submodule.c\n+++ b/submodule.c\n@@ -5,7 +5,7 @@\n #include \"commit.h\"\n #include \"revision.h\"\n \n-int add_submodule_odb(const char *path)\n+static int add_submodule_odb(const char *path)\n {\n \tstruct strbuf objects_directory = STRBUF_INIT;\n \tstruct alternate_object_database *alt_odb;\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131340","messageId":"1263282781-25596-13-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 12/18] utf8.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:55Z","receivedAt":"2010-01-12T07:52:55Z","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 utf8.c |    2 +-\n utf8.h |    1 -\n 2 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/utf8.c b/utf8.c\nindex 7ddff23..ab326ac 100644\n--- a/utf8.c\n+++ b/utf8.c\n@@ -163,7 +163,7 @@ static int git_wcwidth(ucs_char_t ch)\n  * If the string was not a valid UTF-8, *start pointer is set to NULL\n  * and the return value is undefined.\n  */\n-ucs_char_t pick_one_utf8_char(const char **start, size_t *remainder_p)\n+static ucs_char_t pick_one_utf8_char(const char **start, size_t *remainder_p)\n {\n \tunsigned char *s = (unsigned char *)*start;\n \tucs_char_t ch;\ndiff --git a/utf8.h b/utf8.h\nindex ae30ae4..c9738d8 100644\n--- a/utf8.h\n+++ b/utf8.h\n@@ -3,7 +3,6 @@\n \n typedef unsigned int ucs_char_t;  /* assuming 32bit int */\n \n-ucs_char_t pick_one_utf8_char(const char **start, size_t *remainder_p);\n int utf8_width(const char **start, size_t *remainder_p);\n int utf8_strwidth(const char *string);\n int is_utf8(const char *text);\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131346","messageId":"1263282781-25596-14-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 13/18] mailmap.c: remove unused function","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:56Z","receivedAt":"2010-01-12T07:52:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"map_email() is not used anywhere since d20d654 (Change current mailmap\nusage to do matching on both name and email of author/committer.,\n2009-02-08).\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n mailmap.c |    5 -----\n mailmap.h |    1 -\n 2 files changed, 0 insertions(+), 6 deletions(-)\n\ndiff --git a/mailmap.c b/mailmap.c\nindex f167c00..b68c1fe 100644\n--- a/mailmap.c\n+++ b/mailmap.c\n@@ -243,8 +243,3 @@ int map_user(struct string_list *map,\n \tdebug_mm(\"map_user:  --\\n\");\n \treturn 0;\n }\n-\n-int map_email(struct string_list *map, const char *email, char *name, int maxlen)\n-{\n-\treturn map_user(map, (char *)email, 0, name, maxlen);\n-}\ndiff --git a/mailmap.h b/mailmap.h\nindex 4b2ca3a..d5c3664 100644\n--- a/mailmap.h\n+++ b/mailmap.h\n@@ -4,7 +4,6 @@\n int read_mailmap(struct string_list *map, char **repo_abbrev);\n void clear_mailmap(struct string_list *map);\n \n-int map_email(struct string_list *mailmap, const char *email, char *name, int maxlen);\n int map_user(struct string_list *mailmap,\n \t     char *email, int maxlen_email, char *name, int maxlen_name);\n \n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131338","messageId":"1263282781-25596-15-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 14/18] sha1_file.c: remove unused function","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:57Z","receivedAt":"2010-01-12T07:52:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"has_pack_file() is not used anywhere.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n cache.h     |    1 -\n sha1_file.c |    8 --------\n 2 files changed, 0 insertions(+), 9 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex e7bb6b7..90edb5b 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -683,7 +683,6 @@ extern int has_sha1_pack(const unsigned char *sha1);\n extern int has_sha1_file(const unsigned char *sha1);\n extern int has_loose_object_nonlocal(const unsigned char *sha1);\n \n-extern int has_pack_file(const unsigned char *sha1);\n extern int has_pack_index(const unsigned char *sha1);\n \n extern const signed char hexval_table[256];\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 63981fb..7086760 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -2458,14 +2458,6 @@ int has_pack_index(const unsigned char *sha1)\n \treturn 1;\n }\n \n-int has_pack_file(const unsigned char *sha1)\n-{\n-\tstruct stat st;\n-\tif (stat(sha1_pack_name(sha1), &st))\n-\t\treturn 0;\n-\treturn 1;\n-}\n-\n int has_sha1_pack(const unsigned char *sha1)\n {\n \tstruct pack_entry e;\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131343","messageId":"1263282781-25596-16-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 15/18] strbuf.c: remove unused function","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:58Z","receivedAt":"2010-01-12T07:52:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"strbuf_tolower() is not used anywhere.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n strbuf.c |    7 -------\n strbuf.h |    1 -\n 2 files changed, 0 insertions(+), 8 deletions(-)\n\ndiff --git a/strbuf.c b/strbuf.c\nindex a6153dc..3fa81b3 100644\n--- a/strbuf.c\n+++ b/strbuf.c\n@@ -91,13 +91,6 @@ void strbuf_ltrim(struct strbuf *sb)\n \tsb->buf[sb->len] = '\\0';\n }\n \n-void strbuf_tolower(struct strbuf *sb)\n-{\n-\tint i;\n-\tfor (i = 0; i < sb->len; i++)\n-\t\tsb->buf[i] = tolower(sb->buf[i]);\n-}\n-\n struct strbuf **strbuf_split(const struct strbuf *sb, int delim)\n {\n \tint alloc = 2, pos = 0;\ndiff --git a/strbuf.h b/strbuf.h\nindex fa07ecf..b37f06a 100644\n--- a/strbuf.h\n+++ b/strbuf.h\n@@ -81,7 +81,6 @@ extern void strbuf_trim(struct strbuf *);\n extern void strbuf_rtrim(struct strbuf *);\n extern void strbuf_ltrim(struct strbuf *);\n extern int strbuf_cmp(const struct strbuf *, const struct strbuf *);\n-extern void strbuf_tolower(struct strbuf *);\n \n extern struct strbuf **strbuf_split(const struct strbuf *, int delim);\n extern void strbuf_list_free(struct strbuf **);\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131351","messageId":"1263282781-25596-17-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 16/18] blob.c: remove unused function","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:52:59Z","receivedAt":"2010-01-12T07:52:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"parse_blob() is not used anywhere since a510bfa (Mark blobs as parsed when\nthey're actually parsed, 2005-04-28).\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n blob.c |   21 ---------------------\n blob.h |    2 --\n 2 files changed, 0 insertions(+), 23 deletions(-)\n\ndiff --git a/blob.c b/blob.c\nindex bd7d078..ae320bd 100644\n--- a/blob.c\n+++ b/blob.c\n@@ -23,24 +23,3 @@ int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size)\n \titem->object.parsed = 1;\n \treturn 0;\n }\n-\n-int parse_blob(struct blob *item)\n-{\n-        enum object_type type;\n-        void *buffer;\n-        unsigned long size;\n-\tint ret;\n-\n-        if (item->object.parsed)\n-                return 0;\n-        buffer = read_sha1_file(item->object.sha1, &type, &size);\n-        if (!buffer)\n-                return error(\"Could not read %s\",\n-                             sha1_to_hex(item->object.sha1));\n-        if (type != OBJ_BLOB)\n-                return error(\"Object %s not a blob\",\n-                             sha1_to_hex(item->object.sha1));\n-\tret = parse_blob_buffer(item, buffer, size);\n-\tfree(buffer);\n-\treturn ret;\n-}\ndiff --git a/blob.h b/blob.h\nindex ea5d9e9..1f66b9d 100644\n--- a/blob.h\n+++ b/blob.h\n@@ -13,6 +13,4 @@ struct blob *lookup_blob(const unsigned char *sha1);\n \n int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size);\n \n-int parse_blob(struct blob *item);\n-\n #endif /* BLOB_H */\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131342","messageId":"1263282781-25596-18-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 17/18] object.c: remove unused functions","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:53:00Z","receivedAt":"2010-01-12T07:53:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"object_list_append() and object_list_length}() are not used anywhere.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n object.c |   21 ---------------------\n object.h |    5 -----\n 2 files changed, 0 insertions(+), 26 deletions(-)\n\ndiff --git a/object.c b/object.c\nindex fe8eaaf..3ca92c4 100644\n--- a/object.c\n+++ b/object.c\n@@ -217,27 +217,6 @@ struct object_list *object_list_insert(struct object *item,\n         return new_list;\n }\n \n-void object_list_append(struct object *item,\n-\t\t\tstruct object_list **list_p)\n-{\n-\twhile (*list_p) {\n-\t\tlist_p = &((*list_p)->next);\n-\t}\n-\t*list_p = xmalloc(sizeof(struct object_list));\n-\t(*list_p)->next = NULL;\n-\t(*list_p)->item = item;\n-}\n-\n-unsigned object_list_length(struct object_list *list)\n-{\n-\tunsigned ret = 0;\n-\twhile (list) {\n-\t\tlist = list->next;\n-\t\tret++;\n-\t}\n-\treturn ret;\n-}\n-\n int object_list_contains(struct object_list *list, struct object *obj)\n {\n \twhile (list) {\ndiff --git a/object.h b/object.h\nindex 89dd0c4..82877c8 100644\n--- a/object.h\n+++ b/object.h\n@@ -72,11 +72,6 @@ struct object *lookup_unknown_object(const unsigned  char *sha1);\n struct object_list *object_list_insert(struct object *item,\n \t\t\t\t       struct object_list **list_p);\n \n-void object_list_append(struct object *item,\n-\t\t\tstruct object_list **list_p);\n-\n-unsigned object_list_length(struct object_list *list);\n-\n int object_list_contains(struct object_list *list, struct object *obj);\n \n /* Object array handling .. */\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131336","messageId":"1263282781-25596-19-git-send-email-gitster@pobox.com","threadId":"22177","inReplyTo":"1263282781-25596-1-git-send-email-gitster@pobox.com","subject":"[PATCH 18/18] symlinks.c: remove unused functions","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T07:53:01Z","receivedAt":"2010-01-12T07:53:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"invalidate_lstat_cache() and clear_lstat_cache() are not used anywhere.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n cache.h    |    2 --\n symlinks.c |   31 -------------------------------\n 2 files changed, 0 insertions(+), 33 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex 90edb5b..b4b2ba7 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -782,8 +782,6 @@ extern int has_symlink_leading_path(const char *name, int len);\n extern int threaded_has_symlink_leading_path(struct cache_def *, const char *, int);\n extern int has_symlink_or_noent_leading_path(const char *name, int len);\n extern int has_dirs_only_path(const char *name, int len, int prefix_len);\n-extern void invalidate_lstat_cache(const char *name, int len);\n-extern void clear_lstat_cache(void);\n extern void schedule_dir_for_removal(const char *name, int len);\n extern void remove_scheduled_dirs(void);\n \ndiff --git a/symlinks.c b/symlinks.c\nindex 7b0a86d..8860120 100644\n--- a/symlinks.c\n+++ b/symlinks.c\n@@ -179,37 +179,6 @@ static int lstat_cache(struct cache_def *cache, const char *name, int len,\n \treturn ret_flags;\n }\n \n-/*\n- * Invalidate the given 'name' from the cache, if 'name' matches\n- * completely with the cache.\n- */\n-void invalidate_lstat_cache(const char *name, int len)\n-{\n-\tint match_len, previous_slash;\n-\tstruct cache_def *cache = &default_cache;\t/* FIXME */\n-\n-\tmatch_len = longest_path_match(name, len, cache->path, cache->len,\n-\t\t\t\t       &previous_slash);\n-\tif (len == match_len) {\n-\t\tif ((cache->track_flags & FL_DIR) && previous_slash > 0) {\n-\t\t\tcache->path[previous_slash] = '\\0';\n-\t\t\tcache->len = previous_slash;\n-\t\t\tcache->flags = FL_DIR;\n-\t\t} else {\n-\t\t\treset_lstat_cache(cache);\n-\t\t}\n-\t}\n-}\n-\n-/*\n- * Completely clear the contents of the cache\n- */\n-void clear_lstat_cache(void)\n-{\n-\tstruct cache_def *cache = &default_cache;\t/* FIXME */\n-\treset_lstat_cache(cache);\n-}\n-\n #define USE_ONLY_LSTAT  0\n \n /*\n-- \n1.6.6.280.ge295b7.dirty\n"},{"id":"131357","messageId":"4B4C34B3.3010508@viscovery.net","threadId":"22177","inReplyTo":"1263282781-25596-5-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 04/18] date.c: mark file-local function static","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-01-12T08:37:07Z","receivedAt":"2010-01-12T08:37:07Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Junio C Hamano schrieb:\n> diff --git a/date.c b/date.c\n> index 5d05ef6..45f3684 100644\n> --- a/date.c\n> +++ b/date.c\n> @@ -9,7 +9,7 @@\n>  /*\n>   * This is like mktime, but without normalization of tm_wday and tm_yday.\n>   */\n> -time_t tm_to_time_t(const struct tm *tm)\n> +static time_t tm_to_time_t(const struct tm *tm)\n>  {\n>  \tstatic const int mdays[] = {\n>  \t    0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index 5c59687..85dea12 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -198,7 +198,6 @@ extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)))\n>  extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));\n>  \n>  extern int prefixcmp(const char *str, const char *prefix);\n> -extern time_t tm_to_time_t(const struct tm *tm);\n>  \n>  static inline const char *skip_prefix(const char *str, const char *prefix)\n>  {\n\nThis one is used from compat/mingw.c for the gettimeofday emulation.\nPlease leave it extern.\n\n-- Hannes\n"},{"id":"131358","messageId":"7vr5pv3d7w.fsf@alter.siamese.dyndns.org","threadId":"22177","inReplyTo":"4B4C34B3.3010508@viscovery.net","subject":"Re: [PATCH 04/18] date.c: mark file-local function static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-12T09:05:23Z","receivedAt":"2010-01-12T09:05:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j.sixt@viscovery.net> writes:\n\n>> diff --git a/git-compat-util.h b/git-compat-util.h\n>> index 5c59687..85dea12 100644\n>> --- a/git-compat-util.h\n>> +++ b/git-compat-util.h\n>> @@ -198,7 +198,6 @@ extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)))\n>>  extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));\n>>  \n>>  extern int prefixcmp(const char *str, const char *prefix);\n>> -extern time_t tm_to_time_t(const struct tm *tm);\n>>  \n>>  static inline const char *skip_prefix(const char *str, const char *prefix)\n>>  {\n>\n> This one is used from compat/mingw.c for the gettimeofday emulation.\n> Please leave it extern.\n\nOuch; I thought I ran \"git grep <sym> pu\" for all of them.\nSorry and thanks.\n"},{"id":"131360","messageId":"4B4C4448.9060908@viscovery.net","threadId":"22177","inReplyTo":"7vr5pv3d7w.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 04/18] date.c: mark file-local function static","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-01-12T09:43:36Z","receivedAt":"2010-01-12T09:43:36Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Junio C Hamano schrieb:\n> Johannes Sixt <j.sixt@viscovery.net> writes:\n>> This one is used from compat/mingw.c for the gettimeofday emulation.\n>> Please leave it extern.\n\nI'll add this patch to may windows-update series to avoids this hack.\n\n--- 8< ---\nFrom: Johannes Sixt <j6t@kdbg.org>\nSubject: [PATCH] compat/mingw.c: do not use tm_to_time_t from date.c\n\nTo implement gettimeofday(), a broken-down UTC time was requested from the\nsystem using GetSystemTime() and converted using tm_to_time_t() because it\ndoes not look at the current timezone, which mktime() would do. But\nmeanwhile we have grown infrastructure in mingw.c, so that we can use a\ndifferent conversion path. This way we can avoid the ugly back-reference\nfrom the compatibility layer to the generic git code.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n compat/mingw.c |   18 +++++-------------\n 1 files changed, 5 insertions(+), 13 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex faaaade..3c78f39 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -281,19 +281,11 @@ int mkstemp(char *template)\n \n int gettimeofday(struct timeval *tv, void *tz)\n {\n-\tSYSTEMTIME st;\n-\tstruct tm tm;\n-\tGetSystemTime(&st);\n-\ttm.tm_year = st.wYear-1900;\n-\ttm.tm_mon = st.wMonth-1;\n-\ttm.tm_mday = st.wDay;\n-\ttm.tm_hour = st.wHour;\n-\ttm.tm_min = st.wMinute;\n-\ttm.tm_sec = st.wSecond;\n-\ttv->tv_sec = tm_to_time_t(&tm);\n-\tif (tv->tv_sec < 0)\n-\t\treturn -1;\n-\ttv->tv_usec = st.wMilliseconds*1000;\n+\tFILETIME ft;\n+\tGetSystemTimeAsFileTime(&ft);\n+\ttv->tv_sec = filetime_to_time_t(&ft);\n+\t/* the unit is 100-nanoseconds, ie., a 10th of a microsecond */\n+\ttv->tv_usec = (ft.dwLowDateTime % 10000000) / 10;\n \treturn 0;\n }\n \n-- \n1.6.6.1207.g714a1.dirty\n"},{"id":"131392","messageId":"alpine.LNX.2.00.1001121128410.14365@iabervon.org","threadId":"22177","inReplyTo":"1263282781-25596-17-git-send-email-gitster@pobox.com","subject":"Re: [PATCH 16/18] blob.c: remove unused function","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2010-01-12T17:37:18Z","receivedAt":"2010-01-12T17:37:18Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Mon, 11 Jan 2010, Junio C Hamano wrote:\n\n> parse_blob() is not used anywhere since a510bfa (Mark blobs as parsed when\n> they're actually parsed, 2005-04-28).\n\nPerhaps it should be replaced with a comment that blobs are never parsed, \nbecause they don't need to be? We don't need the actual function, but I \nthink it's worth having a note where the function would be.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"131433","messageId":"7veilusdbb.fsf@alter.siamese.dyndns.org","threadId":"22177","inReplyTo":"alpine.LNX.2.00.1001121128410.14365@iabervon.org","subject":"Re: [PATCH 16/18] blob.c: remove unused function","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-13T06:56:24Z","receivedAt":"2010-01-13T06:56:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> On Mon, 11 Jan 2010, Junio C Hamano wrote:\n>\n>> parse_blob() is not used anywhere since a510bfa (Mark blobs as parsed when\n>> they're actually parsed, 2005-04-28).\n>\n> Perhaps it should be replaced with a comment that blobs are never parsed, \n> because they don't need to be? We don't need the actual function, but I \n> think it's worth having a note where the function would be.\n\nI tend to agree.\n\nCare to come up with a patch, with a real description of the reason _why_\nthey don't need to be parsed, please?\n"}]}