{"thread":{"id":"50306","subject":"[PATCH 0/9] drop some unused parameters","startedAt":"2019-01-24T13:11:08Z","lastAt":"2019-01-25T01:53:19Z","messageCount":13,"participants":["Jeff King","Derrick Stolee","Junio C Hamano","brian m. carlson"],"isPatch":true,"patchVersion":1,"patchTotal":9},"messages":[{"id":"367543","messageId":"20190124131104.GA24017@sigill.intra.peff.net","threadId":"50306","inReplyTo":null,"subject":"[PATCH 0/9] drop some unused parameters","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-24T13:11:05Z","receivedAt":"2019-01-24T13:11:08Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"I've mentioned before that I have a series which compiles cleanly with\n-Wunused-parameters. I split this work roughly into three groups:\n\n  1. Patches that fix bugs (i.e., we should have been using the\n     parameter but didn't).\n\n  2. Patches that drop unused parameters (i.e., code cleanup).\n\n  3. Patches that annotate undroppable parameters (e.g., ones that are\n     present due to a callback interface).\n\nAll of the patches from group 1 have been merged already. So this series\nstarts us off on group 2. There are about 50 patches in that group.\nGiven that none of them are urgent, I plan to feed them in batches to\navoid overwhelming reviewers. I'm also ordering them to avoid conflicts\nwith other topics in flight (this batch has no conflicts with 'next',\nand only one minor textual conflict with 'pu').\n\nThe patches themselves are pretty much independent from each other. I\nbased these on master. They're cleanup which _could_ go to maint, and I\nsuspect they'd apply there, too (most of these are pretty old), but\nagain, I don't think there's a particular urgency to this.\n\n  [1/8]: match-trees: drop unused path parameter from score functions\n  [2/8]: apply: drop unused \"def\" parameter from find_name_gnu()\n  [3/8]: create_bundle(): drop unused \"header\" parameter\n  [4/8]: column: drop unused \"opts\" parameter in item_length()\n  [5/8]: show_date_relative(): drop unused \"tz\" parameter\n  [6/8]: config: drop unused parameter from maybe_remove_section()\n  [7/8]: convert: drop len parameter from conversion checks\n  [8/8]: convert: drop path parameter from actual conversion functions\n\n apply.c              |  5 ++---\n builtin/bundle.c     |  3 +--\n bundle.c             |  4 ++--\n bundle.h             |  4 ++--\n cache.h              |  2 +-\n column.c             |  4 ++--\n config.c             |  3 +--\n convert.c            | 28 ++++++++++++++--------------\n date.c               |  8 ++++----\n match-trees.c        | 16 +++++++---------\n t/helper/test-date.c |  2 +-\n 11 files changed, 37 insertions(+), 42 deletions(-)\n\n"},{"id":"367544","messageId":"20190124131133.GA22398@sigill.intra.peff.net","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"[PATCH 1/8] match-trees: drop unused path parameter from score functions","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-24T13:11:34Z","receivedAt":"2019-01-24T13:11:37Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The scores do not take the particular path into account at\nall. It's possible they could, but these are all static file-local\nfunctions. It won't be a big deal to re-add the parameter if they ever\nneed it.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n match-trees.c | 16 +++++++---------\n 1 file changed, 7 insertions(+), 9 deletions(-)\n\ndiff --git a/match-trees.c b/match-trees.c\nindex 2b6d31ef9d..e65e665bf5 100644\n--- a/match-trees.c\n+++ b/match-trees.c\n@@ -3,7 +3,7 @@\n #include \"tree-walk.h\"\n #include \"object-store.h\"\n \n-static int score_missing(unsigned mode, const char *path)\n+static int score_missing(unsigned mode)\n {\n \tint score;\n \n@@ -16,7 +16,7 @@ static int score_missing(unsigned mode, const char *path)\n \treturn score;\n }\n \n-static int score_differs(unsigned mode1, unsigned mode2, const char *path)\n+static int score_differs(unsigned mode1, unsigned mode2)\n {\n \tint score;\n \n@@ -29,7 +29,7 @@ static int score_differs(unsigned mode1, unsigned mode2, const char *path)\n \treturn score;\n }\n \n-static int score_matches(unsigned mode1, unsigned mode2, const char *path)\n+static int score_matches(unsigned mode1, unsigned mode2)\n {\n \tint score;\n \n@@ -98,24 +98,22 @@ static int score_trees(const struct object_id *hash1, const struct object_id *ha\n \n \t\tif (cmp < 0) {\n \t\t\t/* path1 does not appear in two */\n-\t\t\tscore += score_missing(one.entry.mode, one.entry.path);\n+\t\t\tscore += score_missing(one.entry.mode);\n \t\t\tupdate_tree_entry(&one);\n \t\t} else if (cmp > 0) {\n \t\t\t/* path2 does not appear in one */\n-\t\t\tscore += score_missing(two.entry.mode, two.entry.path);\n+\t\t\tscore += score_missing(two.entry.mode);\n \t\t\tupdate_tree_entry(&two);\n \t\t} else {\n \t\t\t/* path appears in both */\n \t\t\tif (!oideq(one.entry.oid, two.entry.oid)) {\n \t\t\t\t/* they are different */\n \t\t\t\tscore += score_differs(one.entry.mode,\n-\t\t\t\t\t\t       two.entry.mode,\n-\t\t\t\t\t\t       one.entry.path);\n+\t\t\t\t\t\t       two.entry.mode);\n \t\t\t} else {\n \t\t\t\t/* same subtree or blob */\n \t\t\t\tscore += score_matches(one.entry.mode,\n-\t\t\t\t\t\t       two.entry.mode,\n-\t\t\t\t\t\t       one.entry.path);\n+\t\t\t\t\t\t       two.entry.mode);\n \t\t\t}\n \t\t\tupdate_tree_entry(&one);\n \t\t\tupdate_tree_entry(&two);\n-- \n2.20.1.842.g8986705066\n\n"},{"id":"367545","messageId":"20190124131142.GB22398@sigill.intra.peff.net","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"[PATCH 2/8] apply: drop unused \"def\" parameter from find_name_gnu()","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-24T13:11:42Z","receivedAt":"2019-01-24T13:11:45Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"We use the \"def\" parameter in find_name_common() for some heuristics,\nbut they are not necessary with the less-ambiguous GNU format. Let's\ndrop this unused parameter.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n apply.c | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/apply.c b/apply.c\nindex 3703bfc8d0..ccab7e7907 100644\n--- a/apply.c\n+++ b/apply.c\n@@ -467,7 +467,6 @@ static char *squash_slash(char *name)\n \n static char *find_name_gnu(struct apply_state *state,\n \t\t\t   const char *line,\n-\t\t\t   const char *def,\n \t\t\t   int p_value)\n {\n \tstruct strbuf name = STRBUF_INIT;\n@@ -714,7 +713,7 @@ static char *find_name(struct apply_state *state,\n \t\t       int terminate)\n {\n \tif (*line == '\"') {\n-\t\tchar *name = find_name_gnu(state, line, def, p_value);\n+\t\tchar *name = find_name_gnu(state, line, p_value);\n \t\tif (name)\n \t\t\treturn name;\n \t}\n@@ -731,7 +730,7 @@ static char *find_name_traditional(struct apply_state *state,\n \tsize_t date_len;\n \n \tif (*line == '\"') {\n-\t\tchar *name = find_name_gnu(state, line, def, p_value);\n+\t\tchar *name = find_name_gnu(state, line, p_value);\n \t\tif (name)\n \t\t\treturn name;\n \t}\n-- \n2.20.1.842.g8986705066\n\n"},{"id":"367546","messageId":"20190124131151.GC22398@sigill.intra.peff.net","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"[PATCH 3/8] create_bundle(): drop unused \"header\" parameter","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-24T13:11:51Z","receivedAt":"2019-01-24T13:11:55Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"There's no need to pass a header struct to create_bundle(); it writes\nthe header information directly to a descriptor (and does not report\nback details to the caller).\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n builtin/bundle.c | 3 +--\n bundle.c         | 4 ++--\n bundle.h         | 4 ++--\n 3 files changed, 5 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin/bundle.c b/builtin/bundle.c\nindex 9e9c65d9c6..1ea4bfdfc1 100644\n--- a/builtin/bundle.c\n+++ b/builtin/bundle.c\n@@ -56,8 +56,7 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)\n \t\t}\n \t\tif (!startup_info->have_repository)\n \t\t\tdie(_(\"Need a repository to create a bundle.\"));\n-\t\treturn !!create_bundle(the_repository, &header,\n-\t\t\t\t       bundle_file, argc, argv);\n+\t\treturn !!create_bundle(the_repository, bundle_file, argc, argv);\n \t} else if (!strcmp(cmd, \"unbundle\")) {\n \t\tif (!startup_info->have_repository)\n \t\t\tdie(_(\"Need a repository to unbundle.\"));\ndiff --git a/bundle.c b/bundle.c\nindex 37b1daa691..b45666c49b 100644\n--- a/bundle.c\n+++ b/bundle.c\n@@ -424,8 +424,8 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)\n \treturn ref_count;\n }\n \n-int create_bundle(struct repository *r, struct bundle_header *header,\n-\t\t  const char *path, int argc, const char **argv)\n+int create_bundle(struct repository *r, const char *path,\n+\t\t  int argc, const char **argv)\n {\n \tstruct lock_file lock = LOCK_INIT;\n \tint bundle_fd = -1;\ndiff --git a/bundle.h b/bundle.h\nindex 781e6f5c3a..37c37d7f65 100644\n--- a/bundle.h\n+++ b/bundle.h\n@@ -18,8 +18,8 @@ struct bundle_header {\n \n int is_bundle(const char *path, int quiet);\n int read_bundle_header(const char *path, struct bundle_header *header);\n-int create_bundle(struct repository *r, struct bundle_header *header,\n-\t\t  const char *path, int argc, const char **argv);\n+int create_bundle(struct repository *r, const char *path,\n+\t\t  int argc, const char **argv);\n int verify_bundle(struct repository *r, struct bundle_header *header, int verbose);\n #define BUNDLE_VERBOSE 1\n int unbundle(struct repository *r, struct bundle_header *header,\n-- \n2.20.1.842.g8986705066\n\n"},{"id":"367547","messageId":"20190124131158.GD22398@sigill.intra.peff.net","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"[PATCH 4/8] column: drop unused \"opts\" parameter in item_length()","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-24T13:11:59Z","receivedAt":"2019-01-24T13:12:02Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"There are no column options which impact the length computation. In\ntheory there might be, but this is a file-local function, so it will be\ntrivial to re-add the parameter should it ever be useful.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n column.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/column.c b/column.c\nindex 2165297608..7a17c14b82 100644\n--- a/column.c\n+++ b/column.c\n@@ -21,7 +21,7 @@ struct column_data {\n };\n \n /* return length of 's' in letters, ANSI escapes stripped */\n-static int item_length(unsigned int colopts, const char *s)\n+static int item_length(const char *s)\n {\n \tint len, i = 0;\n \tstruct strbuf str = STRBUF_INIT;\n@@ -167,7 +167,7 @@ static void display_table(const struct string_list *list,\n \n \tALLOC_ARRAY(data.len, list->nr);\n \tfor (i = 0; i < list->nr; i++)\n-\t\tdata.len[i] = item_length(colopts, list->items[i].string);\n+\t\tdata.len[i] = item_length(list->items[i].string);\n \n \tlayout(&data, &initial_width);\n \n-- \n2.20.1.842.g8986705066\n\n"},{"id":"367548","messageId":"20190124131221.GE22398@sigill.intra.peff.net","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"[PATCH 5/8] show_date_relative(): drop unused \"tz\" parameter","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-24T13:12:21Z","receivedAt":"2019-01-24T13:12:25Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The timestamp we receive is in epoch time, so there's no need for a\ntimezone parameter to interpret it. The matching show_date() uses \"tz\"\nto show dates in author local time, but relative dates show only the\nabsolute time difference. The author's location is irrelevant, barring\nrelativistic effects from using Git close to the speed of light.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n cache.h              | 2 +-\n date.c               | 8 ++++----\n t/helper/test-date.c | 2 +-\n 3 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex 49713cc5a5..8d97939c0d 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -1464,7 +1464,7 @@ struct date_mode {\n struct date_mode *date_mode_from_type(enum date_mode_type type);\n \n const char *show_date(timestamp_t time, int timezone, const struct date_mode *mode);\n-void show_date_relative(timestamp_t time, int tz, const struct timeval *now,\n+void show_date_relative(timestamp_t time, const struct timeval *now,\n \t\t\tstruct strbuf *timebuf);\n int parse_date(const char *date, struct strbuf *out);\n int parse_date_basic(const char *date, timestamp_t *timestamp, int *offset);\ndiff --git a/date.c b/date.c\nindex 9bc15df6f9..61449f8b2e 100644\n--- a/date.c\n+++ b/date.c\n@@ -107,9 +107,9 @@ static int local_tzoffset(timestamp_t time)\n \treturn offset * eastwest;\n }\n \n-void show_date_relative(timestamp_t time, int tz,\n-\t\t\t       const struct timeval *now,\n-\t\t\t       struct strbuf *timebuf)\n+void show_date_relative(timestamp_t time,\n+\t\t\tconst struct timeval *now,\n+\t\t\tstruct strbuf *timebuf)\n {\n \ttimestamp_t diff;\n \tif (now->tv_sec < time) {\n@@ -216,7 +216,7 @@ const char *show_date(timestamp_t time, int tz, const struct date_mode *mode)\n \n \t\tstrbuf_reset(&timebuf);\n \t\tgettimeofday(&now, NULL);\n-\t\tshow_date_relative(time, tz, &now, &timebuf);\n+\t\tshow_date_relative(time, &now, &timebuf);\n \t\treturn timebuf.buf;\n \t}\n \ndiff --git a/t/helper/test-date.c b/t/helper/test-date.c\nindex a0837371ab..aac4d542c2 100644\n--- a/t/helper/test-date.c\n+++ b/t/helper/test-date.c\n@@ -16,7 +16,7 @@ static void show_relative_dates(const char **argv, struct timeval *now)\n \n \tfor (; *argv; argv++) {\n \t\ttime_t t = atoi(*argv);\n-\t\tshow_date_relative(t, 0, now, &buf);\n+\t\tshow_date_relative(t, now, &buf);\n \t\tprintf(\"%s -> %s\\n\", *argv, buf.buf);\n \t}\n \tstrbuf_release(&buf);\n-- \n2.20.1.842.g8986705066\n\n"},{"id":"367549","messageId":"20190124131232.GF22398@sigill.intra.peff.net","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"[PATCH 6/8] config: drop unused parameter from maybe_remove_section()","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-24T13:12:32Z","receivedAt":"2019-01-24T13:12:35Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"We don't need the contents buffer to drop a section; the parse\ninformation in the config_store_data parameter is enough for our logic.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n config.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/config.c b/config.c\nindex ff521eb27a..24ad1a9854 100644\n--- a/config.c\n+++ b/config.c\n@@ -2565,7 +2565,6 @@ static ssize_t write_pair(int fd, const char *key, const char *value,\n  * entry (which all are to be removed).\n  */\n static void maybe_remove_section(struct config_store_data *store,\n-\t\t\t\t const char *contents,\n \t\t\t\t size_t *begin_offset, size_t *end_offset,\n \t\t\t\t int *seen_ptr)\n {\n@@ -2850,7 +2849,7 @@ int git_config_set_multivar_in_file_gently(const char *config_filename,\n \t\t\t\treplace_end = store.parsed[j].end;\n \t\t\t\tcopy_end = store.parsed[j].begin;\n \t\t\t\tif (!value)\n-\t\t\t\t\tmaybe_remove_section(&store, contents,\n+\t\t\t\t\tmaybe_remove_section(&store,\n \t\t\t\t\t\t\t     &copy_end,\n \t\t\t\t\t\t\t     &replace_end, &i);\n \t\t\t\t/*\n-- \n2.20.1.842.g8986705066\n\n"},{"id":"367550","messageId":"20190124131240.GG22398@sigill.intra.peff.net","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"[PATCH 7/8] convert: drop len parameter from conversion checks","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-24T13:12:41Z","receivedAt":"2019-01-24T13:12:44Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"We've already extracted the useful information into our text_stat\nstruct, so the length is no longer needed.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n convert.c | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/convert.c b/convert.c\nindex 0d89ae7c23..dafd6db643 100644\n--- a/convert.c\n+++ b/convert.c\n@@ -92,7 +92,7 @@ static void gather_stats(const char *buf, unsigned long size, struct text_stat *\n  * The same heuristics as diff.c::mmfile_is_binary()\n  * We treat files with bare CR as binary\n  */\n-static int convert_is_binary(unsigned long size, const struct text_stat *stats)\n+static int convert_is_binary(const struct text_stat *stats)\n {\n \tif (stats->lonecr)\n \t\treturn 1;\n@@ -110,7 +110,7 @@ static unsigned int gather_convert_stats(const char *data, unsigned long size)\n \tif (!data || !size)\n \t\treturn 0;\n \tgather_stats(data, size, &stats);\n-\tif (convert_is_binary(size, &stats))\n+\tif (convert_is_binary(&stats))\n \t\tret |= CONVERT_STAT_BITS_BIN;\n \tif (stats.crlf)\n \t\tret |= CONVERT_STAT_BITS_TXT_CRLF;\n@@ -245,7 +245,7 @@ static int has_crlf_in_index(const struct index_state *istate, const char *path)\n \treturn has_crlf;\n }\n \n-static int will_convert_lf_to_crlf(size_t len, struct text_stat *stats,\n+static int will_convert_lf_to_crlf(struct text_stat *stats,\n \t\t\t\t   enum crlf_action crlf_action)\n {\n \tif (output_eol(crlf_action) != EOL_CRLF)\n@@ -260,7 +260,7 @@ static int will_convert_lf_to_crlf(size_t len, struct text_stat *stats,\n \t\tif (stats->lonecr || stats->crlf)\n \t\t\treturn 0;\n \n-\t\tif (convert_is_binary(len, stats))\n+\t\tif (convert_is_binary(stats))\n \t\t\treturn 0;\n \t}\n \treturn 1;\n@@ -527,7 +527,7 @@ static int crlf_to_git(const struct index_state *istate,\n \tconvert_crlf_into_lf = !!stats.crlf;\n \n \tif (crlf_action == CRLF_AUTO || crlf_action == CRLF_AUTO_INPUT || crlf_action == CRLF_AUTO_CRLF) {\n-\t\tif (convert_is_binary(len, &stats))\n+\t\tif (convert_is_binary(&stats))\n \t\t\treturn 0;\n \t\t/*\n \t\t * If the file in the index has any CR in it, do not\n@@ -549,7 +549,7 @@ static int crlf_to_git(const struct index_state *istate,\n \t\t\tnew_stats.crlf = 0;\n \t\t}\n \t\t/* simulate \"git checkout\" */\n-\t\tif (will_convert_lf_to_crlf(len, &new_stats, crlf_action)) {\n+\t\tif (will_convert_lf_to_crlf(&new_stats, crlf_action)) {\n \t\t\tnew_stats.crlf += new_stats.lonelf;\n \t\t\tnew_stats.lonelf = 0;\n \t\t}\n@@ -601,7 +601,7 @@ static int crlf_to_worktree(const char *path, const char *src, size_t len,\n \t\treturn 0;\n \n \tgather_stats(src, len, &stats);\n-\tif (!will_convert_lf_to_crlf(len, &stats, crlf_action))\n+\tif (!will_convert_lf_to_crlf(&stats, crlf_action))\n \t\treturn 0;\n \n \t/* are we \"faking\" in place editing ? */\n-- \n2.20.1.842.g8986705066\n\n"},{"id":"367551","messageId":"20190124131250.GH22398@sigill.intra.peff.net","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"[PATCH 8/8] convert: drop path parameter from actual conversion functions","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-01-24T13:12:51Z","receivedAt":"2019-01-24T13:12:54Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The caller is responsible for looking up the attributes,\nafter which point we no longer care about the path at which\nthe content is found.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n convert.c | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/convert.c b/convert.c\nindex dafd6db643..d8d7df3353 100644\n--- a/convert.c\n+++ b/convert.c\n@@ -591,7 +591,7 @@ static int crlf_to_git(const struct index_state *istate,\n \treturn 1;\n }\n \n-static int crlf_to_worktree(const char *path, const char *src, size_t len,\n+static int crlf_to_worktree(const char *src, size_t len,\n \t\t\t    struct strbuf *buf, enum crlf_action crlf_action)\n {\n \tchar *to_free = NULL;\n@@ -1091,7 +1091,7 @@ static int count_ident(const char *cp, unsigned long size)\n \treturn cnt;\n }\n \n-static int ident_to_git(const char *path, const char *src, size_t len,\n+static int ident_to_git(const char *src, size_t len,\n \t\t\tstruct strbuf *buf, int ident)\n {\n \tchar *dst, *dollar;\n@@ -1135,7 +1135,7 @@ static int ident_to_git(const char *path, const char *src, size_t len,\n \treturn 1;\n }\n \n-static int ident_to_worktree(const char *path, const char *src, size_t len,\n+static int ident_to_worktree(const char *src, size_t len,\n \t\t\t     struct strbuf *buf, int ident)\n {\n \tstruct object_id oid;\n@@ -1416,7 +1416,7 @@ int convert_to_git(const struct index_state *istate,\n \t\t\tlen = dst->len;\n \t\t}\n \t}\n-\treturn ret | ident_to_git(path, src, len, dst, ca.ident);\n+\treturn ret | ident_to_git(src, len, dst, ca.ident);\n }\n \n void convert_to_git_filter_fd(const struct index_state *istate,\n@@ -1434,7 +1434,7 @@ void convert_to_git_filter_fd(const struct index_state *istate,\n \n \tencode_to_git(path, dst->buf, dst->len, dst, ca.working_tree_encoding, conv_flags);\n \tcrlf_to_git(istate, path, dst->buf, dst->len, dst, ca.crlf_action, conv_flags);\n-\tident_to_git(path, dst->buf, dst->len, dst, ca.ident);\n+\tident_to_git(dst->buf, dst->len, dst, ca.ident);\n }\n \n static int convert_to_working_tree_internal(const struct index_state *istate,\n@@ -1447,7 +1447,7 @@ static int convert_to_working_tree_internal(const struct index_state *istate,\n \n \tconvert_attrs(istate, &ca, path);\n \n-\tret |= ident_to_worktree(path, src, len, dst, ca.ident);\n+\tret |= ident_to_worktree(src, len, dst, ca.ident);\n \tif (ret) {\n \t\tsrc = dst->buf;\n \t\tlen = dst->len;\n@@ -1458,7 +1458,7 @@ static int convert_to_working_tree_internal(const struct index_state *istate,\n \t * support smudge).  The filters might expect CRLFs.\n \t */\n \tif ((ca.drv && (ca.drv->smudge || ca.drv->process)) || !normalizing) {\n-\t\tret |= crlf_to_worktree(path, src, len, dst, ca.crlf_action);\n+\t\tret |= crlf_to_worktree(src, len, dst, ca.crlf_action);\n \t\tif (ret) {\n \t\t\tsrc = dst->buf;\n \t\t\tlen = dst->len;\n-- \n2.20.1.842.g8986705066\n"},{"id":"367552","messageId":"fcbafa52-2f6d-1497-f34f-d16ea76ee7f3@gmail.com","threadId":"50306","inReplyTo":"20190124131221.GE22398@sigill.intra.peff.net","subject":"Re: [PATCH 5/8] show_date_relative(): drop unused \"tz\" parameter","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-01-24T14:07:52Z","receivedAt":"2019-01-24T14:07:57Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 1/24/2019 8:12 AM, Jeff King wrote:\n> The timestamp we receive is in epoch time, so there's no need for a\n> timezone parameter to interpret it. The matching show_date() uses \"tz\"\n> to show dates in author local time, but relative dates show only the\n> absolute time difference. The author's location is irrelevant, barring\n> relativistic effects from using Git close to the speed of light.\nI fully support more humor in our commit messages.\n\n-Stolee\n"},{"id":"367553","messageId":"6a77030b-2101-8cbf-b5f8-aa8e9ec69687@gmail.com","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"Re: [PATCH 0/9] drop some unused parameters","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-01-24T14:09:39Z","receivedAt":"2019-01-24T14:09:42Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 1/24/2019 8:11 AM, Jeff King wrote:\n>    2. Patches that drop unused parameters (i.e., code cleanup).\nI've read the patches and they do exactly this, along with explanations \nof why they don't fit in the first category.\n\nThanks,\n-Stolee\n"},{"id":"367595","messageId":"xmqqtvhxhjzm.fsf@gitster-ct.c.googlers.com","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"Re: [PATCH 0/9] drop some unused parameters","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-24T20:35:25Z","receivedAt":"2019-01-24T20:35:31Z","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> The patches themselves are pretty much independent from each other. I\n> based these on master. They're cleanup which _could_ go to maint, and I\n> suspect they'd apply there, too (most of these are pretty old), but\n> again, I don't think there's a particular urgency to this.\n\nThanks for being considerate.  One potential benefit that we might\ngain by applying these clean-ups also to 'maint' is that it would\nallow us to keep 'master' and 'maint' more in sync, so it would make\nit more likely for unrelated bugfixes we may have in the future in\nthe vicinity to also apply cleanly to both.  By definition, the\nvariables removed are not used, so it would make an interesting\nsituation if such a future bugfix needs to look at them (sort of\nturning the changes in this series into category 1 \"we should have\nbeen looking at them, but we didn't\"), but at that point, we'd be\nresurrecting these variables we drop here, so it won't be really\nhurting us.  And if such a bugfix does not need to look at them,\nthen textual context that might be caused by not applying these to\n'maint' but keeping them only to 'master' would not be a big deal,\neither.\n\nSo I can go either way, but I am tempted to leave them outside\n'maint' --- at least that is my current thinking.\n\nThanks.\n\n>\n>   [1/8]: match-trees: drop unused path parameter from score functions\n>   [2/8]: apply: drop unused \"def\" parameter from find_name_gnu()\n>   [3/8]: create_bundle(): drop unused \"header\" parameter\n>   [4/8]: column: drop unused \"opts\" parameter in item_length()\n>   [5/8]: show_date_relative(): drop unused \"tz\" parameter\n>   [6/8]: config: drop unused parameter from maybe_remove_section()\n>   [7/8]: convert: drop len parameter from conversion checks\n>   [8/8]: convert: drop path parameter from actual conversion functions\n>\n>  apply.c              |  5 ++---\n>  builtin/bundle.c     |  3 +--\n>  bundle.c             |  4 ++--\n>  bundle.h             |  4 ++--\n>  cache.h              |  2 +-\n>  column.c             |  4 ++--\n>  config.c             |  3 +--\n>  convert.c            | 28 ++++++++++++++--------------\n>  date.c               |  8 ++++----\n>  match-trees.c        | 16 +++++++---------\n>  t/helper/test-date.c |  2 +-\n>  11 files changed, 37 insertions(+), 42 deletions(-)\n"},{"id":"367634","messageId":"20190125015310.GT423984@genre.crustytoothpaste.net","threadId":"50306","inReplyTo":"20190124131104.GA24017@sigill.intra.peff.net","subject":"Re: [PATCH 0/9] drop some unused parameters","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2019-01-25T01:53:11Z","receivedAt":"2019-01-25T01:53:19Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Thu, Jan 24, 2019 at 08:11:05AM -0500, Jeff King wrote:\n> I've mentioned before that I have a series which compiles cleanly with\n> -Wunused-parameters. I split this work roughly into three groups:\n> \n>   1. Patches that fix bugs (i.e., we should have been using the\n>      parameter but didn't).\n> \n>   2. Patches that drop unused parameters (i.e., code cleanup).\n> \n>   3. Patches that annotate undroppable parameters (e.g., ones that are\n>      present due to a callback interface).\n> \n> All of the patches from group 1 have been merged already. So this series\n> starts us off on group 2. There are about 50 patches in that group.\n> Given that none of them are urgent, I plan to feed them in batches to\n> avoid overwhelming reviewers. I'm also ordering them to avoid conflicts\n> with other topics in flight (this batch has no conflicts with 'next',\n> and only one minor textual conflict with 'pu').\n\nAll of these patches seemed straightforward. I did see a few where there\nmay have originally been some consistency benefit to keeping parameters\n(always passing file name to *_to_worktree, for example), but I'm fine\ndropping them if it means we can get better development help from the\ncompiler.\n\nI am also, for the record, in favor of ignoring the effects of\nrelativity for the purposes of Git. :)\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"}]}