{"thread":{"id":"56941","subject":"[PATCH 0/6] various: remove dead code","startedAt":"2021-11-19T12:46:35Z","lastAt":"2022-04-04T21:23:47Z","messageCount":51,"participants":["Ævar Arnfjörð Bjarmason","Jeff King","Junio C Hamano","Johannes Sixt","Phillip Wood"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"441720","messageId":"cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com","threadId":"56941","inReplyTo":null,"subject":"[PATCH 0/6] various: remove dead code","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T12:46:20Z","receivedAt":"2021-11-19T12:46:35Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove various bits of dead code. These are unrelated things that I've\nspotted here & there recently. Submitted now to clear out this batch\nof dead code removal before it gets any larger.\n\nÆvar Arnfjörð Bjarmason (6):\n  xdiff/xmacros.h: remove unused XDL_PTRFREE\n  pack-bitmap-write: remove unused bitmap_reset() function\n  object-store.h: remove unused has_sha1_file*()\n  alloc.[ch]: remove alloc_report() function\n  strbuf: remove unused istarts_with() function\n  json-writer.[ch]: remove unused formatting functions\n\n alloc.c                                       | 19 ---------------\n alloc.h                                       |  1 -\n .../coccinelle/the_repository.pending.cocci   | 15 ------------\n ewah/bitmap.c                                 |  5 ----\n ewah/ewok.h                                   |  1 -\n git-compat-util.h                             |  1 -\n json-writer.c                                 | 24 -------------------\n json-writer.h                                 |  3 ---\n object-store.h                                |  4 ----\n strbuf.c                                      |  9 -------\n xdiff/xmacros.h                               |  1 -\n 11 files changed, 83 deletions(-)\n\n-- \n2.34.0.817.gb03b3d32691\n\n"},{"id":"441721","messageId":"patch-1.6-32bb8ad4de0-20211119T124420Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com","subject":"[PATCH 1/6] xdiff/xmacros.h: remove unused XDL_PTRFREE","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T12:46:21Z","receivedAt":"2021-11-19T12:46:36Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This macro was added in 3443546f6ef (Use a *real* built-in diff\ngenerator, 2006-03-24), but none of the xdiff code uses it, it uses\nxdl_free() directly.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n xdiff/xmacros.h | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/xdiff/xmacros.h b/xdiff/xmacros.h\nindex 2809a28ca96..ae4636c2477 100644\n--- a/xdiff/xmacros.h\n+++ b/xdiff/xmacros.h\n@@ -34,7 +34,6 @@\n #define XDL_ADDBITS(v,b)\t((v) + ((v) >> (b)))\n #define XDL_MASKBITS(b)\t\t((1UL << (b)) - 1)\n #define XDL_HASHLONG(v,b)\t(XDL_ADDBITS((unsigned long)(v), b) & XDL_MASKBITS(b))\n-#define XDL_PTRFREE(p) do { if (p) { xdl_free(p); (p) = NULL; } } while (0)\n #define XDL_LE32_PUT(p, v) \\\n do { \\\n \tunsigned char *__p = (unsigned char *) (p); \\\n-- \n2.34.0.817.gb03b3d32691\n\n"},{"id":"441722","messageId":"patch-2.6-826027d2cd5-20211119T124420Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com","subject":"[PATCH 2/6] pack-bitmap-write: remove unused bitmap_reset() function","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T12:46:22Z","receivedAt":"2021-11-19T12:46:37Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This function hasn't been used since 449fa5ee069 (pack-bitmap-write:\nignore BITMAP_FLAG_REUSE, 2020-12-08), which was a cleanup commit\nintending to get rid of the code around the resetting of bitmaps.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n ewah/bitmap.c | 5 -----\n ewah/ewok.h   | 1 -\n 2 files changed, 6 deletions(-)\n\ndiff --git a/ewah/bitmap.c b/ewah/bitmap.c\nindex 38a47c44db4..87d5cc8fa30 100644\n--- a/ewah/bitmap.c\n+++ b/ewah/bitmap.c\n@@ -216,11 +216,6 @@ int bitmap_is_subset(struct bitmap *self, struct bitmap *other)\n \treturn 0;\n }\n \n-void bitmap_reset(struct bitmap *bitmap)\n-{\n-\tmemset(bitmap->words, 0x0, bitmap->word_alloc * sizeof(eword_t));\n-}\n-\n void bitmap_free(struct bitmap *bitmap)\n {\n \tif (bitmap == NULL)\ndiff --git a/ewah/ewok.h b/ewah/ewok.h\nindex 66920965da1..7eb8b9b6301 100644\n--- a/ewah/ewok.h\n+++ b/ewah/ewok.h\n@@ -177,7 +177,6 @@ struct bitmap *bitmap_dup(const struct bitmap *src);\n void bitmap_set(struct bitmap *self, size_t pos);\n void bitmap_unset(struct bitmap *self, size_t pos);\n int bitmap_get(struct bitmap *self, size_t pos);\n-void bitmap_reset(struct bitmap *self);\n void bitmap_free(struct bitmap *self);\n int bitmap_equals(struct bitmap *self, struct bitmap *other);\n int bitmap_is_subset(struct bitmap *self, struct bitmap *other);\n-- \n2.34.0.817.gb03b3d32691\n\n"},{"id":"441723","messageId":"patch-3.6-62ed0ec6077-20211119T124420Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com","subject":"[PATCH 3/6] object-store.h: remove unused has_sha1_file*()","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T12:46:23Z","receivedAt":"2021-11-19T12:46:38Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"These macros were last used in 5d3679ee023 (sha1-file: drop\nhas_sha1_file(), 2019-01-07), so let's remove coccinelle migration\nrules added 9b45f499818 (object-store: prepare has_{sha1, object}_file\nto handle any repo, 2018-11-13), along with the compatibility macros\nthemselves.\n\nThe \"These functions..\" in the diff context and the general comment\nabout compatibility macros still applies to\n\"NO_THE_REPOSITORY_COMPATIBILITY_MACROS\" use just a few lines below\nthis, so let's keep the comment.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n contrib/coccinelle/the_repository.pending.cocci | 15 ---------------\n object-store.h                                  |  4 ----\n 2 files changed, 19 deletions(-)\n\ndiff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci\nindex 2ee702ecf7f..072ea0d9228 100644\n--- a/contrib/coccinelle/the_repository.pending.cocci\n+++ b/contrib/coccinelle/the_repository.pending.cocci\n@@ -11,21 +11,6 @@ expression G;\n + repo_read_object_file(the_repository,\n   E, F, G)\n \n-@@\n-expression E;\n-@@\n-- has_sha1_file(\n-+ repo_has_sha1_file(the_repository,\n-  E)\n-\n-@@\n-expression E;\n-expression F;\n-@@\n-- has_sha1_file_with_flags(\n-+ repo_has_sha1_file_with_flags(the_repository,\n-  E)\n-\n @@\n expression E;\n @@\ndiff --git a/object-store.h b/object-store.h\nindex 952efb6a4be..1717f73eea3 100644\n--- a/object-store.h\n+++ b/object-store.h\n@@ -286,10 +286,6 @@ int has_object(struct repository *r, const struct object_id *oid,\n  * These functions can be removed once all callers have migrated to\n  * has_object() and/or oid_object_info_extended().\n  */\n-#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS\n-#define has_sha1_file_with_flags(sha1, flags) repo_has_sha1_file_with_flags(the_repository, sha1, flags)\n-#define has_sha1_file(sha1) repo_has_sha1_file(the_repository, sha1)\n-#endif\n int repo_has_object_file(struct repository *r, const struct object_id *oid);\n int repo_has_object_file_with_flags(struct repository *r,\n \t\t\t\t    const struct object_id *oid, int flags);\n-- \n2.34.0.817.gb03b3d32691\n\n"},{"id":"441724","messageId":"patch-4.6-bd8aa9b1554-20211119T124420Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com","subject":"[PATCH 4/6] alloc.[ch]: remove alloc_report() function","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T12:46:24Z","receivedAt":"2021-11-19T12:46:40Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"The alloc_report() function has been orphaned since its introduction\nin 855419f764a (Add specialized object allocator, 2006-06-19), it\nappears to have been used for demonstration purposes in that commit\nmessage.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n alloc.c | 19 -------------------\n alloc.h |  1 -\n 2 files changed, 20 deletions(-)\n\ndiff --git a/alloc.c b/alloc.c\nindex 957a0af3626..bf7982712f1 100644\n--- a/alloc.c\n+++ b/alloc.c\n@@ -122,22 +122,3 @@ void *alloc_commit_node(struct repository *r)\n \tinit_commit_node(c);\n \treturn c;\n }\n-\n-static void report(const char *name, unsigned int count, size_t size)\n-{\n-\tfprintf(stderr, \"%10s: %8u (%\"PRIuMAX\" kB)\\n\",\n-\t\t\tname, count, (uintmax_t) size);\n-}\n-\n-#define REPORT(name, type)\t\\\n-    report(#name, r->parsed_objects->name##_state->count, \\\n-\t\t  r->parsed_objects->name##_state->count * sizeof(type) >> 10)\n-\n-void alloc_report(struct repository *r)\n-{\n-\tREPORT(blob, struct blob);\n-\tREPORT(tree, struct tree);\n-\tREPORT(commit, struct commit);\n-\tREPORT(tag, struct tag);\n-\tREPORT(object, union any_object);\n-}\ndiff --git a/alloc.h b/alloc.h\nindex 371d388b552..3f4a0ad310a 100644\n--- a/alloc.h\n+++ b/alloc.h\n@@ -13,7 +13,6 @@ void init_commit_node(struct commit *c);\n void *alloc_commit_node(struct repository *r);\n void *alloc_tag_node(struct repository *r);\n void *alloc_object_node(struct repository *r);\n-void alloc_report(struct repository *r);\n \n struct alloc_state *allocate_alloc_state(void);\n void clear_alloc_state(struct alloc_state *s);\n-- \n2.34.0.817.gb03b3d32691\n\n"},{"id":"441725","messageId":"patch-5.6-642eec3d77c-20211119T124420Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com","subject":"[PATCH 5/6] strbuf: remove unused istarts_with() function","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T12:46:25Z","receivedAt":"2021-11-19T12:46:41Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This function was added in 66b8af3e124 (strbuf: add a case insensitive\nstarts_with(), 2018-03-09) for use with code added in\n2f0c4a362c5 (utf8: teach same_encoding() alternative UTF encoding\nnames, 2018-04-15).\n\nThat use got rewritten in ed283588330 (convert: use skip_iprefix() in\nvalidate_encoding(), 2019-11-08) to use skip_iprefix() instead.\n\nIt's arguably slightly odd to have a skip_prefix() and iskip_prefix(),\nbut not both variants when it comes to starts_with(), but this is easy\nenough to resurrect should we ever need it, so let's drop it for now.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n git-compat-util.h | 1 -\n strbuf.c          | 9 ---------\n 2 files changed, 10 deletions(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex d70ce142861..7117024a28b 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -512,7 +512,6 @@ report_fn get_warn_routine(void);\n void set_die_is_recursing_routine(int (*routine)(void));\n \n int starts_with(const char *str, const char *prefix);\n-int istarts_with(const char *str, const char *prefix);\n \n /*\n  * If the string \"str\" begins with the string found in \"prefix\", return 1.\ndiff --git a/strbuf.c b/strbuf.c\nindex b22e9816559..1b52e3c8250 100644\n--- a/strbuf.c\n+++ b/strbuf.c\n@@ -12,15 +12,6 @@ int starts_with(const char *str, const char *prefix)\n \t\t\treturn 0;\n }\n \n-int istarts_with(const char *str, const char *prefix)\n-{\n-\tfor (; ; str++, prefix++)\n-\t\tif (!*prefix)\n-\t\t\treturn 1;\n-\t\telse if (tolower(*str) != tolower(*prefix))\n-\t\t\treturn 0;\n-}\n-\n int skip_to_optional_arg_default(const char *str, const char *prefix,\n \t\t\t\t const char **arg, const char *def)\n {\n-- \n2.34.0.817.gb03b3d32691\n\n"},{"id":"441726","messageId":"patch-6.6-e14ee1f8c47-20211119T124420Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com","subject":"[PATCH 6/6] json-writer.[ch]: remove unused formatting functions","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T12:46:26Z","receivedAt":"2021-11-19T12:46:43Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"These were added in 75459410edd (json_writer: new routines to create\nJSON data, 2018-07-13) for future use with trace2, but have not been\nused by anything. These are easy enough to bring back should we need\nthem, but until then there's no point in carrying them.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n json-writer.c | 24 ------------------------\n json-writer.h |  3 ---\n 2 files changed, 27 deletions(-)\n\ndiff --git a/json-writer.c b/json-writer.c\nindex f1cfd8fa8c6..8a81c2d5fce 100644\n--- a/json-writer.c\n+++ b/json-writer.c\n@@ -331,36 +331,12 @@ void jw_array_false(struct json_writer *jw)\n \tstrbuf_addstr(&jw->json, \"false\");\n }\n \n-void jw_array_bool(struct json_writer *jw, int value)\n-{\n-\tif (value)\n-\t\tjw_array_true(jw);\n-\telse\n-\t\tjw_array_false(jw);\n-}\n-\n void jw_array_null(struct json_writer *jw)\n {\n \tarray_common(jw);\n \tstrbuf_addstr(&jw->json, \"null\");\n }\n \n-void jw_array_sub_jw(struct json_writer *jw, const struct json_writer *value)\n-{\n-\tassert_is_terminated(value);\n-\n-\tarray_common(jw);\n-\tappend_sub_jw(jw, value);\n-}\n-\n-void jw_array_argc_argv(struct json_writer *jw, int argc, const char **argv)\n-{\n-\tint k;\n-\n-\tfor (k = 0; k < argc; k++)\n-\t\tjw_array_string(jw, argv[k]);\n-}\n-\n void jw_array_argv(struct json_writer *jw, const char **argv)\n {\n \twhile (*argv)\ndiff --git a/json-writer.h b/json-writer.h\nindex 209355e0f12..563c7e0e004 100644\n--- a/json-writer.h\n+++ b/json-writer.h\n@@ -95,10 +95,7 @@ void jw_array_intmax(struct json_writer *jw, intmax_t value);\n void jw_array_double(struct json_writer *jw, int precision, double value);\n void jw_array_true(struct json_writer *jw);\n void jw_array_false(struct json_writer *jw);\n-void jw_array_bool(struct json_writer *jw, int value);\n void jw_array_null(struct json_writer *jw);\n-void jw_array_sub_jw(struct json_writer *jw, const struct json_writer *value);\n-void jw_array_argc_argv(struct json_writer *jw, int argc, const char **argv);\n void jw_array_argv(struct json_writer *jw, const char **argv);\n \n void jw_array_inline_begin_object(struct json_writer *jw);\n-- \n2.34.0.817.gb03b3d32691\n\n"},{"id":"441734","messageId":"YZe1fcGztalCRnb4@coredump.intra.peff.net","threadId":"56941","inReplyTo":"patch-1.6-32bb8ad4de0-20211119T124420Z-avarab@gmail.com","subject":"Re: [PATCH 1/6] xdiff/xmacros.h: remove unused XDL_PTRFREE","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-11-19T14:32:29Z","receivedAt":"2021-11-19T14:32:32Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 19, 2021 at 01:46:21PM +0100, Ævar Arnfjörð Bjarmason wrote:\n\n> This macro was added in 3443546f6ef (Use a *real* built-in diff\n> generator, 2006-03-24), but none of the xdiff code uses it, it uses\n> xdl_free() directly.\n\nMakes sense. Even if we wanted to use it, it is equivalent to our own\nFREE_AND_NULL() anyway (since xdl_free() is really just an alias for\nfree()).\n\n-Peff\n"},{"id":"441735","messageId":"YZe1nA20VkDRVUy3@coredump.intra.peff.net","threadId":"56941","inReplyTo":"patch-2.6-826027d2cd5-20211119T124420Z-avarab@gmail.com","subject":"Re: [PATCH 2/6] pack-bitmap-write: remove unused bitmap_reset() function","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-11-19T14:33:00Z","receivedAt":"2021-11-19T14:33:02Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 19, 2021 at 01:46:22PM +0100, Ævar Arnfjörð Bjarmason wrote:\n\n> This function hasn't been used since 449fa5ee069 (pack-bitmap-write:\n> ignore BITMAP_FLAG_REUSE, 2020-12-08), which was a cleanup commit\n> intending to get rid of the code around the resetting of bitmaps.\n\nMakes sense, though I assume you mean s/resetting/reuse/ in the final\nsentence.\n\n-Peff\n"},{"id":"441736","messageId":"YZe13Blt/NXy85gS@coredump.intra.peff.net","threadId":"56941","inReplyTo":"patch-3.6-62ed0ec6077-20211119T124420Z-avarab@gmail.com","subject":"Re: [PATCH 3/6] object-store.h: remove unused has_sha1_file*()","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-11-19T14:34:04Z","receivedAt":"2021-11-19T14:34:07Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 19, 2021 at 01:46:23PM +0100, Ævar Arnfjörð Bjarmason wrote:\n\n> These macros were last used in 5d3679ee023 (sha1-file: drop\n> has_sha1_file(), 2019-01-07), so let's remove coccinelle migration\n> rules added 9b45f499818 (object-store: prepare has_{sha1, object}_file\n> to handle any repo, 2018-11-13), along with the compatibility macros\n> themselves.\n> \n> The \"These functions..\" in the diff context and the general comment\n> about compatibility macros still applies to\n> \"NO_THE_REPOSITORY_COMPATIBILITY_MACROS\" use just a few lines below\n> this, so let's keep the comment.\n\nYep, makes sense. I cleaned up the object_id.cocci file, but didn't\nthink to look for the_repository rules or helpers. Nice to see this\ngoing away, too.\n\n-Peff\n"},{"id":"441737","messageId":"YZe3RCFsXomGHv3G@coredump.intra.peff.net","threadId":"56941","inReplyTo":"patch-5.6-642eec3d77c-20211119T124420Z-avarab@gmail.com","subject":"Re: [PATCH 5/6] strbuf: remove unused istarts_with() function","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-11-19T14:40:04Z","receivedAt":"2021-11-19T14:40:07Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 19, 2021 at 01:46:25PM +0100, Ævar Arnfjörð Bjarmason wrote:\n\n> This function was added in 66b8af3e124 (strbuf: add a case insensitive\n> starts_with(), 2018-03-09) for use with code added in\n> 2f0c4a362c5 (utf8: teach same_encoding() alternative UTF encoding\n> names, 2018-04-15).\n> \n> That use got rewritten in ed283588330 (convert: use skip_iprefix() in\n> validate_encoding(), 2019-11-08) to use skip_iprefix() instead.\n> \n> It's arguably slightly odd to have a skip_prefix() and iskip_prefix(),\n> but not both variants when it comes to starts_with(), but this is easy\n> enough to resurrect should we ever need it, so let's drop it for now.\n\nI have a custom patch that uses istarts_with(), but it's not something\nthat will ever go upstream. I'll probably just switch it to do:\n\n  skip_iprefix(..., &dummy);\n\nwhich is equivalent. Not really an objection, but just mentioning that\nunused functions may have ripple effects for topics in flight.\n\n-Peff\n"},{"id":"441738","messageId":"YZe3nRLPV4FrzbDq@coredump.intra.peff.net","threadId":"56941","inReplyTo":"patch-6.6-e14ee1f8c47-20211119T124420Z-avarab@gmail.com","subject":"Re: [PATCH 6/6] json-writer.[ch]: remove unused formatting functions","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-11-19T14:41:33Z","receivedAt":"2021-11-19T14:41:37Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 19, 2021 at 01:46:26PM +0100, Ævar Arnfjörð Bjarmason wrote:\n\n> These were added in 75459410edd (json_writer: new routines to create\n> JSON data, 2018-07-13) for future use with trace2, but have not been\n> used by anything. These are easy enough to bring back should we need\n> them, but until then there's no point in carrying them.\n\nThis is another one where I could _imagine_ somebody using these in a\ncustom patch or topic in flight (though I don't have any such case\nmyself). And they complete the json-writer API, so keeping them is not\nthat ugly.\n\nBut I'm also OK with dropping them under the notion of cleanliness, and\nthat they're easy-ish to resurrect.\n\n-Peff\n"},{"id":"441739","messageId":"YZe3vU/reCcRGK2j@coredump.intra.peff.net","threadId":"56941","inReplyTo":"cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com","subject":"Re: [PATCH 0/6] various: remove dead code","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-11-19T14:42:05Z","receivedAt":"2021-11-19T14:42:09Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 19, 2021 at 01:46:20PM +0100, Ævar Arnfjörð Bjarmason wrote:\n\n> Remove various bits of dead code. These are unrelated things that I've\n> spotted here & there recently. Submitted now to clear out this batch\n> of dead code removal before it gets any larger.\n\nThese all look fine to me. I gave some light philosophical musings on\nthe later ones, but I'd be OK to see the code dropped.\n\n-Peff\n"},{"id":"441774","messageId":"xmqqtug8ot47.fsf@gitster.g","threadId":"56941","inReplyTo":"patch-5.6-642eec3d77c-20211119T124420Z-avarab@gmail.com","subject":"Re: [PATCH 5/6] strbuf: remove unused istarts_with() function","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-11-19T19:14:32Z","receivedAt":"2021-11-19T19:14:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> It's arguably slightly odd to have a skip_prefix() and iskip_prefix(),\n> but not both variants when it comes to starts_with(), but this is easy\n> enough to resurrect should we ever need it, so let's drop it for now.\n\nLet's not go there.  It is not easy at all to know that it used to\nexist in the first place, which is more important part than knowing\nthat it is there and resurrect it.  We'd end up hearing from people\nthat the API is uneven, and seeing a patch that reinvents it, which\nwe have to review again.\n\nLeaving an unused implementation is not without risk of going it\nstale (imagine: when iskip_prefix() learns to honor locale aware\ncase insensitive comparison, istarts_with() that nobody uses may\nbe left behind without anybody noticing), so carrying an unused\nfunction is not cost-free, but in this particular case, I think\nkeeping it is much better economy than removing it, even without\ncounting the cost of writing this response.\n\nThanks.\n\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n>  git-compat-util.h | 1 -\n>  strbuf.c          | 9 ---------\n>  2 files changed, 10 deletions(-)\n>\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index d70ce142861..7117024a28b 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -512,7 +512,6 @@ report_fn get_warn_routine(void);\n>  void set_die_is_recursing_routine(int (*routine)(void));\n>  \n>  int starts_with(const char *str, const char *prefix);\n> -int istarts_with(const char *str, const char *prefix);\n>  \n>  /*\n>   * If the string \"str\" begins with the string found in \"prefix\", return 1.\n> diff --git a/strbuf.c b/strbuf.c\n> index b22e9816559..1b52e3c8250 100644\n> --- a/strbuf.c\n> +++ b/strbuf.c\n> @@ -12,15 +12,6 @@ int starts_with(const char *str, const char *prefix)\n>  \t\t\treturn 0;\n>  }\n>  \n> -int istarts_with(const char *str, const char *prefix)\n> -{\n> -\tfor (; ; str++, prefix++)\n> -\t\tif (!*prefix)\n> -\t\t\treturn 1;\n> -\t\telse if (tolower(*str) != tolower(*prefix))\n> -\t\t\treturn 0;\n> -}\n> -\n>  int skip_to_optional_arg_default(const char *str, const char *prefix,\n>  \t\t\t\t const char **arg, const char *def)\n>  {\n"},{"id":"441777","messageId":"xmqqh7c8orua.fsf@gitster.g","threadId":"56941","inReplyTo":"patch-4.6-bd8aa9b1554-20211119T124420Z-avarab@gmail.com","subject":"Re: [PATCH 4/6] alloc.[ch]: remove alloc_report() function","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-11-19T19:42:05Z","receivedAt":"2021-11-19T19:42:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> The alloc_report() function has been orphaned since its introduction\n> in 855419f764a (Add specialized object allocator, 2006-06-19), it\n> appears to have been used for demonstration purposes in that commit\n> message.\n\nStopping a program in debugger, and calling these functions that\nhave otherwise no callers, is a fairly handy way to debug.\nIt is likely that we used it while developing the allocator.\n\nIf we truly want to get rid of it, we'd want to lose the \"count\"\nmember from the alloc_state structure, which is otherwise unused, I\nwould think.\n\nEven though I do not think 5/6 and 6/6 in this series are good idea,\nI am on the fence on this one, slightly leaning to \"lose it\" but not\nthat strongly.\n\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n>  alloc.c | 19 -------------------\n>  alloc.h |  1 -\n>  2 files changed, 20 deletions(-)\n>\n> diff --git a/alloc.c b/alloc.c\n> index 957a0af3626..bf7982712f1 100644\n> --- a/alloc.c\n> +++ b/alloc.c\n> @@ -122,22 +122,3 @@ void *alloc_commit_node(struct repository *r)\n>  \tinit_commit_node(c);\n>  \treturn c;\n>  }\n> -\n> -static void report(const char *name, unsigned int count, size_t size)\n> -{\n> -\tfprintf(stderr, \"%10s: %8u (%\"PRIuMAX\" kB)\\n\",\n> -\t\t\tname, count, (uintmax_t) size);\n> -}\n> -\n> -#define REPORT(name, type)\t\\\n> -    report(#name, r->parsed_objects->name##_state->count, \\\n> -\t\t  r->parsed_objects->name##_state->count * sizeof(type) >> 10)\n> -\n> -void alloc_report(struct repository *r)\n> -{\n> -\tREPORT(blob, struct blob);\n> -\tREPORT(tree, struct tree);\n> -\tREPORT(commit, struct commit);\n> -\tREPORT(tag, struct tag);\n> -\tREPORT(object, union any_object);\n> -}\n> diff --git a/alloc.h b/alloc.h\n> index 371d388b552..3f4a0ad310a 100644\n> --- a/alloc.h\n> +++ b/alloc.h\n> @@ -13,7 +13,6 @@ void init_commit_node(struct commit *c);\n>  void *alloc_commit_node(struct repository *r);\n>  void *alloc_tag_node(struct repository *r);\n>  void *alloc_object_node(struct repository *r);\n> -void alloc_report(struct repository *r);\n>  \n>  struct alloc_state *allocate_alloc_state(void);\n>  void clear_alloc_state(struct alloc_state *s);\n"},{"id":"441780","messageId":"cover-v2-0.5-00000000000-20211119T202455Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com","subject":"[PATCH v2 0/5] various: remove dead code","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T20:26:20Z","receivedAt":"2021-11-19T20:26:30Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove various bits of dead code. Addresses feedback on the v1:\nhttps://lore.kernel.org/git/cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com/\n\nThere's the minor commit message changes seen below, and the strbuf\nchange has been ejected per Junio's request.\n\nÆvar Arnfjörð Bjarmason (5):\n  xdiff/xmacros.h: remove unused XDL_PTRFREE\n  pack-bitmap-write: remove unused bitmap_reset() function\n  object-store.h: remove unused has_sha1_file*()\n  alloc.[ch]: remove alloc_report() function\n  json-writer.[ch]: remove unused formatting functions\n\n alloc.c                                       | 19 ---------------\n alloc.h                                       |  1 -\n .../coccinelle/the_repository.pending.cocci   | 15 ------------\n ewah/bitmap.c                                 |  5 ----\n ewah/ewok.h                                   |  1 -\n json-writer.c                                 | 24 -------------------\n json-writer.h                                 |  3 ---\n object-store.h                                |  4 ----\n xdiff/xmacros.h                               |  1 -\n 9 files changed, 73 deletions(-)\n\nRange-diff against v1:\n1:  32bb8ad4de0 ! 1:  1e7e6d8d482 xdiff/xmacros.h: remove unused XDL_PTRFREE\n    @@ Commit message\n         generator, 2006-03-24), but none of the xdiff code uses it, it uses\n         xdl_free() directly.\n     \n    +    If we need its functionality again we'll use the FREE_AND_NULL() macro\n    +    added in 481df65f4f7 (git-compat-util: add a FREE_AND_NULL() wrapper\n    +    around free(ptr); ptr = NULL, 2017-06-15).\n    +\n         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n     \n      ## xdiff/xmacros.h ##\n2:  826027d2cd5 ! 2:  c9026af8953 pack-bitmap-write: remove unused bitmap_reset() function\n    @@ Commit message\n     \n         This function hasn't been used since 449fa5ee069 (pack-bitmap-write:\n         ignore BITMAP_FLAG_REUSE, 2020-12-08), which was a cleanup commit\n    -    intending to get rid of the code around the resetting of bitmaps.\n    +    intending to get rid of the code around the reusing of bitmaps.\n     \n         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n     \n3:  62ed0ec6077 = 3:  6d0ca249001 object-store.h: remove unused has_sha1_file*()\n4:  bd8aa9b1554 = 4:  672bdffde83 alloc.[ch]: remove alloc_report() function\n5:  642eec3d77c < -:  ----------- strbuf: remove unused istarts_with() function\n6:  e14ee1f8c47 = 5:  818f1a46d66 json-writer.[ch]: remove unused formatting functions\n-- \n2.34.0.823.gcc3243ae16c\n\n"},{"id":"441781","messageId":"patch-v2-1.5-1e7e6d8d482-20211119T202455Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v2-0.5-00000000000-20211119T202455Z-avarab@gmail.com","subject":"[PATCH v2 1/5] xdiff/xmacros.h: remove unused XDL_PTRFREE","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T20:26:21Z","receivedAt":"2021-11-19T20:26:31Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This macro was added in 3443546f6ef (Use a *real* built-in diff\ngenerator, 2006-03-24), but none of the xdiff code uses it, it uses\nxdl_free() directly.\n\nIf we need its functionality again we'll use the FREE_AND_NULL() macro\nadded in 481df65f4f7 (git-compat-util: add a FREE_AND_NULL() wrapper\naround free(ptr); ptr = NULL, 2017-06-15).\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n xdiff/xmacros.h | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/xdiff/xmacros.h b/xdiff/xmacros.h\nindex 2809a28ca96..ae4636c2477 100644\n--- a/xdiff/xmacros.h\n+++ b/xdiff/xmacros.h\n@@ -34,7 +34,6 @@\n #define XDL_ADDBITS(v,b)\t((v) + ((v) >> (b)))\n #define XDL_MASKBITS(b)\t\t((1UL << (b)) - 1)\n #define XDL_HASHLONG(v,b)\t(XDL_ADDBITS((unsigned long)(v), b) & XDL_MASKBITS(b))\n-#define XDL_PTRFREE(p) do { if (p) { xdl_free(p); (p) = NULL; } } while (0)\n #define XDL_LE32_PUT(p, v) \\\n do { \\\n \tunsigned char *__p = (unsigned char *) (p); \\\n-- \n2.34.0.823.gcc3243ae16c\n\n"},{"id":"441782","messageId":"patch-v2-2.5-c9026af8953-20211119T202455Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v2-0.5-00000000000-20211119T202455Z-avarab@gmail.com","subject":"[PATCH v2 2/5] pack-bitmap-write: remove unused bitmap_reset() function","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T20:26:22Z","receivedAt":"2021-11-19T20:26:33Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This function hasn't been used since 449fa5ee069 (pack-bitmap-write:\nignore BITMAP_FLAG_REUSE, 2020-12-08), which was a cleanup commit\nintending to get rid of the code around the reusing of bitmaps.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n ewah/bitmap.c | 5 -----\n ewah/ewok.h   | 1 -\n 2 files changed, 6 deletions(-)\n\ndiff --git a/ewah/bitmap.c b/ewah/bitmap.c\nindex 38a47c44db4..87d5cc8fa30 100644\n--- a/ewah/bitmap.c\n+++ b/ewah/bitmap.c\n@@ -216,11 +216,6 @@ int bitmap_is_subset(struct bitmap *self, struct bitmap *other)\n \treturn 0;\n }\n \n-void bitmap_reset(struct bitmap *bitmap)\n-{\n-\tmemset(bitmap->words, 0x0, bitmap->word_alloc * sizeof(eword_t));\n-}\n-\n void bitmap_free(struct bitmap *bitmap)\n {\n \tif (bitmap == NULL)\ndiff --git a/ewah/ewok.h b/ewah/ewok.h\nindex 66920965da1..7eb8b9b6301 100644\n--- a/ewah/ewok.h\n+++ b/ewah/ewok.h\n@@ -177,7 +177,6 @@ struct bitmap *bitmap_dup(const struct bitmap *src);\n void bitmap_set(struct bitmap *self, size_t pos);\n void bitmap_unset(struct bitmap *self, size_t pos);\n int bitmap_get(struct bitmap *self, size_t pos);\n-void bitmap_reset(struct bitmap *self);\n void bitmap_free(struct bitmap *self);\n int bitmap_equals(struct bitmap *self, struct bitmap *other);\n int bitmap_is_subset(struct bitmap *self, struct bitmap *other);\n-- \n2.34.0.823.gcc3243ae16c\n\n"},{"id":"441783","messageId":"patch-v2-5.5-818f1a46d66-20211119T202455Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v2-0.5-00000000000-20211119T202455Z-avarab@gmail.com","subject":"[PATCH v2 5/5] json-writer.[ch]: remove unused formatting functions","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T20:26:25Z","receivedAt":"2021-11-19T20:26:37Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"These were added in 75459410edd (json_writer: new routines to create\nJSON data, 2018-07-13) for future use with trace2, but have not been\nused by anything. These are easy enough to bring back should we need\nthem, but until then there's no point in carrying them.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n json-writer.c | 24 ------------------------\n json-writer.h |  3 ---\n 2 files changed, 27 deletions(-)\n\ndiff --git a/json-writer.c b/json-writer.c\nindex f1cfd8fa8c6..8a81c2d5fce 100644\n--- a/json-writer.c\n+++ b/json-writer.c\n@@ -331,36 +331,12 @@ void jw_array_false(struct json_writer *jw)\n \tstrbuf_addstr(&jw->json, \"false\");\n }\n \n-void jw_array_bool(struct json_writer *jw, int value)\n-{\n-\tif (value)\n-\t\tjw_array_true(jw);\n-\telse\n-\t\tjw_array_false(jw);\n-}\n-\n void jw_array_null(struct json_writer *jw)\n {\n \tarray_common(jw);\n \tstrbuf_addstr(&jw->json, \"null\");\n }\n \n-void jw_array_sub_jw(struct json_writer *jw, const struct json_writer *value)\n-{\n-\tassert_is_terminated(value);\n-\n-\tarray_common(jw);\n-\tappend_sub_jw(jw, value);\n-}\n-\n-void jw_array_argc_argv(struct json_writer *jw, int argc, const char **argv)\n-{\n-\tint k;\n-\n-\tfor (k = 0; k < argc; k++)\n-\t\tjw_array_string(jw, argv[k]);\n-}\n-\n void jw_array_argv(struct json_writer *jw, const char **argv)\n {\n \twhile (*argv)\ndiff --git a/json-writer.h b/json-writer.h\nindex 209355e0f12..563c7e0e004 100644\n--- a/json-writer.h\n+++ b/json-writer.h\n@@ -95,10 +95,7 @@ void jw_array_intmax(struct json_writer *jw, intmax_t value);\n void jw_array_double(struct json_writer *jw, int precision, double value);\n void jw_array_true(struct json_writer *jw);\n void jw_array_false(struct json_writer *jw);\n-void jw_array_bool(struct json_writer *jw, int value);\n void jw_array_null(struct json_writer *jw);\n-void jw_array_sub_jw(struct json_writer *jw, const struct json_writer *value);\n-void jw_array_argc_argv(struct json_writer *jw, int argc, const char **argv);\n void jw_array_argv(struct json_writer *jw, const char **argv);\n \n void jw_array_inline_begin_object(struct json_writer *jw);\n-- \n2.34.0.823.gcc3243ae16c\n\n"},{"id":"441784","messageId":"patch-v2-4.5-672bdffde83-20211119T202455Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v2-0.5-00000000000-20211119T202455Z-avarab@gmail.com","subject":"[PATCH v2 4/5] alloc.[ch]: remove alloc_report() function","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T20:26:24Z","receivedAt":"2021-11-19T20:26:38Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"The alloc_report() function has been orphaned since its introduction\nin 855419f764a (Add specialized object allocator, 2006-06-19), it\nappears to have been used for demonstration purposes in that commit\nmessage.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n alloc.c | 19 -------------------\n alloc.h |  1 -\n 2 files changed, 20 deletions(-)\n\ndiff --git a/alloc.c b/alloc.c\nindex 957a0af3626..bf7982712f1 100644\n--- a/alloc.c\n+++ b/alloc.c\n@@ -122,22 +122,3 @@ void *alloc_commit_node(struct repository *r)\n \tinit_commit_node(c);\n \treturn c;\n }\n-\n-static void report(const char *name, unsigned int count, size_t size)\n-{\n-\tfprintf(stderr, \"%10s: %8u (%\"PRIuMAX\" kB)\\n\",\n-\t\t\tname, count, (uintmax_t) size);\n-}\n-\n-#define REPORT(name, type)\t\\\n-    report(#name, r->parsed_objects->name##_state->count, \\\n-\t\t  r->parsed_objects->name##_state->count * sizeof(type) >> 10)\n-\n-void alloc_report(struct repository *r)\n-{\n-\tREPORT(blob, struct blob);\n-\tREPORT(tree, struct tree);\n-\tREPORT(commit, struct commit);\n-\tREPORT(tag, struct tag);\n-\tREPORT(object, union any_object);\n-}\ndiff --git a/alloc.h b/alloc.h\nindex 371d388b552..3f4a0ad310a 100644\n--- a/alloc.h\n+++ b/alloc.h\n@@ -13,7 +13,6 @@ void init_commit_node(struct commit *c);\n void *alloc_commit_node(struct repository *r);\n void *alloc_tag_node(struct repository *r);\n void *alloc_object_node(struct repository *r);\n-void alloc_report(struct repository *r);\n \n struct alloc_state *allocate_alloc_state(void);\n void clear_alloc_state(struct alloc_state *s);\n-- \n2.34.0.823.gcc3243ae16c\n\n"},{"id":"441785","messageId":"patch-v2-3.5-6d0ca249001-20211119T202455Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v2-0.5-00000000000-20211119T202455Z-avarab@gmail.com","subject":"[PATCH v2 3/5] object-store.h: remove unused has_sha1_file*()","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-19T20:26:23Z","receivedAt":"2021-11-19T20:26:39Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"These macros were last used in 5d3679ee023 (sha1-file: drop\nhas_sha1_file(), 2019-01-07), so let's remove coccinelle migration\nrules added 9b45f499818 (object-store: prepare has_{sha1, object}_file\nto handle any repo, 2018-11-13), along with the compatibility macros\nthemselves.\n\nThe \"These functions..\" in the diff context and the general comment\nabout compatibility macros still applies to\n\"NO_THE_REPOSITORY_COMPATIBILITY_MACROS\" use just a few lines below\nthis, so let's keep the comment.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n contrib/coccinelle/the_repository.pending.cocci | 15 ---------------\n object-store.h                                  |  4 ----\n 2 files changed, 19 deletions(-)\n\ndiff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci\nindex 2ee702ecf7f..072ea0d9228 100644\n--- a/contrib/coccinelle/the_repository.pending.cocci\n+++ b/contrib/coccinelle/the_repository.pending.cocci\n@@ -11,21 +11,6 @@ expression G;\n + repo_read_object_file(the_repository,\n   E, F, G)\n \n-@@\n-expression E;\n-@@\n-- has_sha1_file(\n-+ repo_has_sha1_file(the_repository,\n-  E)\n-\n-@@\n-expression E;\n-expression F;\n-@@\n-- has_sha1_file_with_flags(\n-+ repo_has_sha1_file_with_flags(the_repository,\n-  E)\n-\n @@\n expression E;\n @@\ndiff --git a/object-store.h b/object-store.h\nindex 952efb6a4be..1717f73eea3 100644\n--- a/object-store.h\n+++ b/object-store.h\n@@ -286,10 +286,6 @@ int has_object(struct repository *r, const struct object_id *oid,\n  * These functions can be removed once all callers have migrated to\n  * has_object() and/or oid_object_info_extended().\n  */\n-#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS\n-#define has_sha1_file_with_flags(sha1, flags) repo_has_sha1_file_with_flags(the_repository, sha1, flags)\n-#define has_sha1_file(sha1) repo_has_sha1_file(the_repository, sha1)\n-#endif\n int repo_has_object_file(struct repository *r, const struct object_id *oid);\n int repo_has_object_file_with_flags(struct repository *r,\n \t\t\t\t    const struct object_id *oid, int flags);\n-- \n2.34.0.823.gcc3243ae16c\n\n"},{"id":"441795","messageId":"xmqq7dd3q0bh.fsf@gitster.g","threadId":"56941","inReplyTo":"YZe3nRLPV4FrzbDq@coredump.intra.peff.net","subject":"Re: [PATCH 6/6] json-writer.[ch]: remove unused formatting functions","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-11-19T21:53:38Z","receivedAt":"2021-11-19T21:53:44Z","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 Fri, Nov 19, 2021 at 01:46:26PM +0100, Ævar Arnfjörð Bjarmason wrote:\n>\n>> These were added in 75459410edd (json_writer: new routines to create\n>> JSON data, 2018-07-13) for future use with trace2, but have not been\n>> used by anything. These are easy enough to bring back should we need\n>> them, but until then there's no point in carrying them.\n>\n> This is another one where I could _imagine_ somebody using these in a\n> custom patch or topic in flight (though I don't have any such case\n> myself). And they complete the json-writer API, so keeping them is not\n> that ugly.\n\nThis falls into the same category as 5/6 in my mind.\n\n> But I'm also OK with dropping them under the notion of cleanliness, and\n> that they're easy-ish to resurrect.\n\nAgain, all the same \"resurrecting is the easy part, knowing we used\nto have one is hardre\", \"keeping is not without cost\", \"apparently\nincomplete API is an invitation for future reinvention\" apply here.\n\n"},{"id":"452413","messageId":"patch-v3-1.7-bac78566135-20220326T171200Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v3-0.7-00000000000-20220326T171200Z-avarab@gmail.com","subject":"[PATCH v3 1/7] run-command.h: remove always unused \"clean_on_exit_handler_cbdata\"","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-26T17:14:13Z","receivedAt":"2022-03-26T17:14:38Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove a \"struct child_process\" member added in\nac2fbaa674c (run-command: add clean_on_exit_handler, 2016-10-16), but\nwhich was never used.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n run-command.h | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/run-command.h b/run-command.h\nindex 07bed6c31b4..5bd0c933e80 100644\n--- a/run-command.h\n+++ b/run-command.h\n@@ -142,7 +142,6 @@ struct child_process {\n \tunsigned clean_on_exit:1;\n \tunsigned wait_after_clean:1;\n \tvoid (*clean_on_exit_handler)(struct child_process *process);\n-\tvoid *clean_on_exit_handler_cbdata;\n };\n \n #define CHILD_PROCESS_INIT { \\\n-- \n2.35.1.1535.gf8d72b9da1e\n\n"},{"id":"452414","messageId":"patch-v3-4.7-6bd89f3cf42-20220326T171200Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v3-0.7-00000000000-20220326T171200Z-avarab@gmail.com","subject":"[PATCH v3 4/7] pack-bitmap-write: remove unused bitmap_reset() function","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-26T17:14:16Z","receivedAt":"2022-03-26T17:14:40Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This function hasn't been used since 449fa5ee069 (pack-bitmap-write:\nignore BITMAP_FLAG_REUSE, 2020-12-08), which was a cleanup commit\nintending to get rid of the code around the reusing of bitmaps.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n ewah/bitmap.c | 5 -----\n ewah/ewok.h   | 1 -\n 2 files changed, 6 deletions(-)\n\ndiff --git a/ewah/bitmap.c b/ewah/bitmap.c\nindex 38a47c44db4..87d5cc8fa30 100644\n--- a/ewah/bitmap.c\n+++ b/ewah/bitmap.c\n@@ -216,11 +216,6 @@ int bitmap_is_subset(struct bitmap *self, struct bitmap *other)\n \treturn 0;\n }\n \n-void bitmap_reset(struct bitmap *bitmap)\n-{\n-\tmemset(bitmap->words, 0x0, bitmap->word_alloc * sizeof(eword_t));\n-}\n-\n void bitmap_free(struct bitmap *bitmap)\n {\n \tif (bitmap == NULL)\ndiff --git a/ewah/ewok.h b/ewah/ewok.h\nindex 66920965da1..7eb8b9b6301 100644\n--- a/ewah/ewok.h\n+++ b/ewah/ewok.h\n@@ -177,7 +177,6 @@ struct bitmap *bitmap_dup(const struct bitmap *src);\n void bitmap_set(struct bitmap *self, size_t pos);\n void bitmap_unset(struct bitmap *self, size_t pos);\n int bitmap_get(struct bitmap *self, size_t pos);\n-void bitmap_reset(struct bitmap *self);\n void bitmap_free(struct bitmap *self);\n int bitmap_equals(struct bitmap *self, struct bitmap *other);\n int bitmap_is_subset(struct bitmap *self, struct bitmap *other);\n-- \n2.35.1.1535.gf8d72b9da1e\n\n"},{"id":"452416","messageId":"cover-v3-0.7-00000000000-20220326T171200Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v2-0.5-00000000000-20211119T202455Z-avarab@gmail.com","subject":"[PATCH v3 0/7] various: remove dead code, drop i18n not used in-tree","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-26T17:14:12Z","receivedAt":"2022-03-26T17:14:41Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"An altered version of\nhttps://lore.kernel.org/git/cover-v2-0.5-00000000000-20211119T202455Z-avarab@gmail.com\nsent a while ago, I ejected the json-writer.[ch] change, which had\nobjections (on the v1, but it seems E-Mails were crossed).\n\nA the range-diff shows there's a couple of new trivial patches at the\nstart.\n\nI then added a patch to the end to remove some i18n-markings that\naren't used anywhere in-tree, let's not waste time translating things\nfor hypothetical out-of-tree users as we migrate the last bits of\nfunctionality away from shellscripts.\n\nÆvar Arnfjörð Bjarmason (7):\n  run-command.h: remove always unused \"clean_on_exit_handler_cbdata\"\n  configure.ac: remove USE_PIC comment\n  xdiff/xmacros.h: remove unused XDL_PTRFREE\n  pack-bitmap-write: remove unused bitmap_reset() function\n  object-store.h: remove unused has_sha1_file*()\n  alloc.[ch]: remove alloc_report() function\n  git-sh-setup: don't mark trees not used in-tree for i18n\n\n alloc.c                                       | 21 -------------------\n alloc.h                                       |  1 -\n configure.ac                                  |  3 ---\n .../coccinelle/the_repository.pending.cocci   | 15 -------------\n ewah/bitmap.c                                 |  5 -----\n ewah/ewok.h                                   |  1 -\n git-sh-setup.sh                               | 20 +++++++++++-------\n object-store.h                                |  4 ----\n run-command.h                                 |  1 -\n xdiff/xmacros.h                               |  1 -\n 10 files changed, 13 insertions(+), 59 deletions(-)\n\nRange-diff against v2:\n-:  ----------- > 1:  bac78566135 run-command.h: remove always unused \"clean_on_exit_handler_cbdata\"\n-:  ----------- > 2:  93dc689e1aa configure.ac: remove USE_PIC comment\n1:  1e7e6d8d482 = 3:  05adde5b9e4 xdiff/xmacros.h: remove unused XDL_PTRFREE\n2:  c9026af8953 = 4:  6bd89f3cf42 pack-bitmap-write: remove unused bitmap_reset() function\n3:  6d0ca249001 = 5:  cf7969f8f67 object-store.h: remove unused has_sha1_file*()\n4:  672bdffde83 ! 6:  b60a4c24a28 alloc.[ch]: remove alloc_report() function\n    @@ Commit message\n         appears to have been used for demonstration purposes in that commit\n         message.\n     \n    +    These might be handy to manually use in a debugger, but keeping them\n    +    and the \"count\" member of \"alloc_state\" just for that doesn't seem\n    +    worth it.\n    +\n         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n     \n      ## alloc.c ##\n    +@@ alloc.c: union any_object {\n    + };\n    + \n    + struct alloc_state {\n    +-\tint count; /* total number of nodes allocated */\n    + \tint nr;    /* number of nodes left in current allocation */\n    + \tvoid *p;   /* first free node in current allocation */\n    + \n    +@@ alloc.c: static inline void *alloc_node(struct alloc_state *s, size_t node_size)\n    + \t\ts->slabs[s->slab_nr++] = s->p;\n    + \t}\n    + \ts->nr--;\n    +-\ts->count++;\n    + \tret = s->p;\n    + \ts->p = (char *)s->p + node_size;\n    + \tmemset(ret, 0, node_size);\n     @@ alloc.c: void *alloc_commit_node(struct repository *r)\n      \tinit_commit_node(c);\n      \treturn c;\n5:  818f1a46d66 < -:  ----------- json-writer.[ch]: remove unused formatting functions\n-:  ----------- > 7:  7a82b1fd005 git-sh-setup: don't mark trees not used in-tree for i18n\n-- \n2.35.1.1535.gf8d72b9da1e\n\n"},{"id":"452415","messageId":"patch-v3-3.7-05adde5b9e4-20220326T171200Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v3-0.7-00000000000-20220326T171200Z-avarab@gmail.com","subject":"[PATCH v3 3/7] xdiff/xmacros.h: remove unused XDL_PTRFREE","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-26T17:14:15Z","receivedAt":"2022-03-26T17:14:43Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This macro was added in 3443546f6ef (Use a *real* built-in diff\ngenerator, 2006-03-24), but none of the xdiff code uses it, it uses\nxdl_free() directly.\n\nIf we need its functionality again we'll use the FREE_AND_NULL() macro\nadded in 481df65f4f7 (git-compat-util: add a FREE_AND_NULL() wrapper\naround free(ptr); ptr = NULL, 2017-06-15).\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n xdiff/xmacros.h | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/xdiff/xmacros.h b/xdiff/xmacros.h\nindex 2809a28ca96..ae4636c2477 100644\n--- a/xdiff/xmacros.h\n+++ b/xdiff/xmacros.h\n@@ -34,7 +34,6 @@\n #define XDL_ADDBITS(v,b)\t((v) + ((v) >> (b)))\n #define XDL_MASKBITS(b)\t\t((1UL << (b)) - 1)\n #define XDL_HASHLONG(v,b)\t(XDL_ADDBITS((unsigned long)(v), b) & XDL_MASKBITS(b))\n-#define XDL_PTRFREE(p) do { if (p) { xdl_free(p); (p) = NULL; } } while (0)\n #define XDL_LE32_PUT(p, v) \\\n do { \\\n \tunsigned char *__p = (unsigned char *) (p); \\\n-- \n2.35.1.1535.gf8d72b9da1e\n\n"},{"id":"452419","messageId":"patch-v3-2.7-93dc689e1aa-20220326T171200Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v3-0.7-00000000000-20220326T171200Z-avarab@gmail.com","subject":"[PATCH v3 2/7] configure.ac: remove USE_PIC comment","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-26T17:14:14Z","receivedAt":"2022-03-26T17:14:44Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove a comment about a Makefile knob that was removed in\nf7661ce0b8e (Remove -fPIC which was only needed for Git.xs,\n2006-09-29). The comment had been copied over to configure.ac in\n633b423961d (Copy description of build configuration variables to\nconfigure.ac, 2006-07-08).\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n configure.ac | 3 ---\n 1 file changed, 3 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 6bd6bef1c44..789dcde3eae 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -1189,9 +1189,6 @@ AC_COMPILE_IFELSE([BSD_SYSCTL_SRC],\n GIT_CONF_SUBST([HAVE_BSD_SYSCTL])\n \n ## Other checks.\n-# Define USE_PIC if you need the main git objects to be built with -fPIC\n-# in order to build and link perl/Git.so.  x86-64 seems to need this.\n-#\n # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.\n # Enable it on Windows.  By default, symrefs are still used.\n #\n-- \n2.35.1.1535.gf8d72b9da1e\n\n"},{"id":"452417","messageId":"patch-v3-5.7-cf7969f8f67-20220326T171200Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v3-0.7-00000000000-20220326T171200Z-avarab@gmail.com","subject":"[PATCH v3 5/7] object-store.h: remove unused has_sha1_file*()","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-26T17:14:17Z","receivedAt":"2022-03-26T17:14:45Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"These macros were last used in 5d3679ee023 (sha1-file: drop\nhas_sha1_file(), 2019-01-07), so let's remove coccinelle migration\nrules added 9b45f499818 (object-store: prepare has_{sha1, object}_file\nto handle any repo, 2018-11-13), along with the compatibility macros\nthemselves.\n\nThe \"These functions..\" in the diff context and the general comment\nabout compatibility macros still applies to\n\"NO_THE_REPOSITORY_COMPATIBILITY_MACROS\" use just a few lines below\nthis, so let's keep the comment.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n contrib/coccinelle/the_repository.pending.cocci | 15 ---------------\n object-store.h                                  |  4 ----\n 2 files changed, 19 deletions(-)\n\ndiff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci\nindex 2ee702ecf7f..072ea0d9228 100644\n--- a/contrib/coccinelle/the_repository.pending.cocci\n+++ b/contrib/coccinelle/the_repository.pending.cocci\n@@ -11,21 +11,6 @@ expression G;\n + repo_read_object_file(the_repository,\n   E, F, G)\n \n-@@\n-expression E;\n-@@\n-- has_sha1_file(\n-+ repo_has_sha1_file(the_repository,\n-  E)\n-\n-@@\n-expression E;\n-expression F;\n-@@\n-- has_sha1_file_with_flags(\n-+ repo_has_sha1_file_with_flags(the_repository,\n-  E)\n-\n @@\n expression E;\n @@\ndiff --git a/object-store.h b/object-store.h\nindex bd2322ed8ce..53996018c11 100644\n--- a/object-store.h\n+++ b/object-store.h\n@@ -312,10 +312,6 @@ int has_object(struct repository *r, const struct object_id *oid,\n  * These functions can be removed once all callers have migrated to\n  * has_object() and/or oid_object_info_extended().\n  */\n-#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS\n-#define has_sha1_file_with_flags(sha1, flags) repo_has_sha1_file_with_flags(the_repository, sha1, flags)\n-#define has_sha1_file(sha1) repo_has_sha1_file(the_repository, sha1)\n-#endif\n int repo_has_object_file(struct repository *r, const struct object_id *oid);\n int repo_has_object_file_with_flags(struct repository *r,\n \t\t\t\t    const struct object_id *oid, int flags);\n-- \n2.35.1.1535.gf8d72b9da1e\n\n"},{"id":"452418","messageId":"patch-v3-6.7-b60a4c24a28-20220326T171200Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v3-0.7-00000000000-20220326T171200Z-avarab@gmail.com","subject":"[PATCH v3 6/7] alloc.[ch]: remove alloc_report() function","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-26T17:14:18Z","receivedAt":"2022-03-26T17:14:48Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"The alloc_report() function has been orphaned since its introduction\nin 855419f764a (Add specialized object allocator, 2006-06-19), it\nappears to have been used for demonstration purposes in that commit\nmessage.\n\nThese might be handy to manually use in a debugger, but keeping them\nand the \"count\" member of \"alloc_state\" just for that doesn't seem\nworth it.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n alloc.c | 21 ---------------------\n alloc.h |  1 -\n 2 files changed, 22 deletions(-)\n\ndiff --git a/alloc.c b/alloc.c\nindex 957a0af3626..27f697e4c87 100644\n--- a/alloc.c\n+++ b/alloc.c\n@@ -27,7 +27,6 @@ union any_object {\n };\n \n struct alloc_state {\n-\tint count; /* total number of nodes allocated */\n \tint nr;    /* number of nodes left in current allocation */\n \tvoid *p;   /* first free node in current allocation */\n \n@@ -63,7 +62,6 @@ static inline void *alloc_node(struct alloc_state *s, size_t node_size)\n \t\ts->slabs[s->slab_nr++] = s->p;\n \t}\n \ts->nr--;\n-\ts->count++;\n \tret = s->p;\n \ts->p = (char *)s->p + node_size;\n \tmemset(ret, 0, node_size);\n@@ -122,22 +120,3 @@ void *alloc_commit_node(struct repository *r)\n \tinit_commit_node(c);\n \treturn c;\n }\n-\n-static void report(const char *name, unsigned int count, size_t size)\n-{\n-\tfprintf(stderr, \"%10s: %8u (%\"PRIuMAX\" kB)\\n\",\n-\t\t\tname, count, (uintmax_t) size);\n-}\n-\n-#define REPORT(name, type)\t\\\n-    report(#name, r->parsed_objects->name##_state->count, \\\n-\t\t  r->parsed_objects->name##_state->count * sizeof(type) >> 10)\n-\n-void alloc_report(struct repository *r)\n-{\n-\tREPORT(blob, struct blob);\n-\tREPORT(tree, struct tree);\n-\tREPORT(commit, struct commit);\n-\tREPORT(tag, struct tag);\n-\tREPORT(object, union any_object);\n-}\ndiff --git a/alloc.h b/alloc.h\nindex 371d388b552..3f4a0ad310a 100644\n--- a/alloc.h\n+++ b/alloc.h\n@@ -13,7 +13,6 @@ void init_commit_node(struct commit *c);\n void *alloc_commit_node(struct repository *r);\n void *alloc_tag_node(struct repository *r);\n void *alloc_object_node(struct repository *r);\n-void alloc_report(struct repository *r);\n \n struct alloc_state *allocate_alloc_state(void);\n void clear_alloc_state(struct alloc_state *s);\n-- \n2.35.1.1535.gf8d72b9da1e\n\n"},{"id":"452420","messageId":"patch-v3-7.7-7a82b1fd005-20220326T171200Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v3-0.7-00000000000-20220326T171200Z-avarab@gmail.com","subject":"[PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-26T17:14:19Z","receivedAt":"2022-03-26T17:14:49Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Partially revert d323c6b6410 (i18n: git-sh-setup.sh: mark strings for\ntranslation, 2016-06-17).\n\nThese strings are no longer used in-tree, and we shouldn't be wasting\ntranslator time on them for the benefit of a hypothetical out-of-tree\nuser of git-sh-setup.sh.\n\nSince d03ebd411c6 (rebase: remove the rebase.useBuiltin setting,\n2019-03-18) we've had no in-tree user of require_work_tree_exists(),\nand since the more recent c1e10b2dce2 (git-sh-setup: remove messaging\nsupporting --preserve-merges, 2021-10-21) the only in-tree user of\nrequire_clean_work_tree() is git-filter-branch.sh. Let's only\ntranslate the message it uses, and revert the others to the pre-image\nof d323c6b6410.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n git-sh-setup.sh | 20 +++++++++++++-------\n 1 file changed, 13 insertions(+), 7 deletions(-)\n\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex d92df37e992..1abceaac8d3 100644\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -187,8 +187,7 @@ cd_to_toplevel () {\n require_work_tree_exists () {\n \tif test \"z$(git rev-parse --is-bare-repository)\" != zfalse\n \tthen\n-\t\tprogram_name=$0\n-\t\tdie \"$(eval_gettext \"fatal: \\$program_name cannot be used without a working tree.\")\"\n+\t\tdie \"fatal: $0 cannot be used without a working tree.\"\n \tfi\n }\n \n@@ -206,13 +205,13 @@ require_clean_work_tree () {\n \n \tif ! git diff-files --quiet --ignore-submodules\n \tthen\n-\t\taction=$1\n-\t\tcase \"$action\" in\n+\t\tcase \"$1\" in\n \t\t\"rewrite branches\")\n \t\t\tgettextln \"Cannot rewrite branches: You have unstaged changes.\" >&2\n \t\t\t;;\n \t\t*)\n-\t\t\teval_gettextln \"Cannot \\$action: You have unstaged changes.\" >&2\n+\t\t\t# Some out-of-tree user of require_clean_work_tree()\n+\t\t\techo \"Cannot $1: You have unstaged changes.\" >&2\n \t\t\t;;\n \t\tesac\n \t\terr=1\n@@ -222,8 +221,15 @@ require_clean_work_tree () {\n \tthen\n \t\tif test $err = 0\n \t\tthen\n-\t\t\taction=$1\n-\t\t\teval_gettextln \"Cannot \\$action: Your index contains uncommitted changes.\" >&2\n+\t\t\tcase \"$1\" in\n+\t\t\t\"rewrite branches\")\n+\t\t\t\tgettextln \"Cannot rewrite branches: You have unstaged changes.\" >&2\n+\t\t\t\t;;\n+\t\t\t*)\n+\t\t\t\t# Some out-of-tree user of require_clean_work_tree()\n+\t\t\t\techo \"Cannot $1: Your index contains uncommitted changes.\" >&2\n+\t\t\t\t;;\n+\t\t\tesac\n \t\telse\n \t\t    gettextln \"Additionally, your index contains uncommitted changes.\" >&2\n \t\tfi\n-- \n2.35.1.1535.gf8d72b9da1e\n\n"},{"id":"452427","messageId":"2e2d20d6-a33d-b223-d364-ab43d92dd220@kdbg.org","threadId":"56941","inReplyTo":"patch-v3-7.7-7a82b1fd005-20220326T171200Z-avarab@gmail.com","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2022-03-27T10:47:26Z","receivedAt":"2022-03-27T10:47:35Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 26.03.22 um 18:14 schrieb Ævar Arnfjörð Bjarmason:\n> Partially revert d323c6b6410 (i18n: git-sh-setup.sh: mark strings for\n> translation, 2016-06-17).\n> \n> These strings are no longer used in-tree, and we shouldn't be wasting\n> translator time on them for the benefit of a hypothetical out-of-tree\n> user of git-sh-setup.sh.\n\nThere is public documentation for these functions. Hence, you must\nassume that they are used in scripts outside of Git. Castrating their\nfunctionality like this patch does is unacceptable.\n\n-- Hannes\n"},{"id":"452433","messageId":"220327.8635j3fx3t.gmgdl@evledraar.gmail.com","threadId":"56941","inReplyTo":"2e2d20d6-a33d-b223-d364-ab43d92dd220@kdbg.org","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-27T11:15:38Z","receivedAt":"2022-03-27T11:39:07Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Sun, Mar 27 2022, Johannes Sixt wrote:\n\n> Am 26.03.22 um 18:14 schrieb Ævar Arnfjörð Bjarmason:\n>> Partially revert d323c6b6410 (i18n: git-sh-setup.sh: mark strings for\n>> translation, 2016-06-17).\n>> \n>> These strings are no longer used in-tree, and we shouldn't be wasting\n>> translator time on them for the benefit of a hypothetical out-of-tree\n>> user of git-sh-setup.sh.\n>\n> There is public documentation for these functions. Hence, you must\n> assume that they are used in scripts outside of Git. Castrating their\n> functionality like this patch does is unacceptable.\n\nFor require_clean_work_tree() the public documentation for this function\nstates that it will emit a specific error message in English, and you're\nexpected to Lego-interpolate a string that we'll concatenate with it:\n\n\t[...]It emits an error message of the form `Cannot\n        <action>: <reason>. <hint>`, and dies.  Example:\n\t+\n\t----------------\n\trequire_clean_work_tree rebase \"Please commit or stash them.\"\n\nSo I think that marking it for translation like this as d323c6b6410 was\nalways broken in that it broke that documented promise.\n\nBut that's just an argument for keeping the require_clean_work_tree()\npart of this patch, not require_work_tree_exists().\n\nFor that one and others in git-sh-setup we've never said that we'd\nprovide these translated (and to the extent we've implied anything about\nthe rest, have strongly implied the opposite with\nrequire_clean_work_tree()'s docs).\n\nNothing will break for out-of-tree users as a result of this\nchange. When we added these functions and their documentation their\noutput wouldn't be translated, then sometimes it was, now it's not\nagain.\n\nWe need also need to be mindful of translator time, it's a *lot* of\nstrings to go through, and e.g. I've commented in the past on patches\nthat marked stuff in t/helper/ for translation.\n\nSome hypothetical out-of-tree user is, I think, a much stronger\ncandidate for skipping translation than that.\n\nAlso keep in mind that we don't even translate in-tree contrib stuff\nlike contrib/subtree/ (the recent \"not-really-contrib\" scalar being an\nexception).\n\nSo I really think this is fine as-is, don't you think that if someone\nout-of-tree had such strong expectations about the human-readable\nstrings these emit that they'd have long since stopped using them and\nprovided their own replacements?\n"},{"id":"452455","messageId":"63bf6e97-1dca-c2b1-5673-301039e73acf@kdbg.org","threadId":"56941","inReplyTo":"220327.8635j3fx3t.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2022-03-28T06:04:26Z","receivedAt":"2022-03-28T06:04:36Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 27.03.22 um 13:15 schrieb Ævar Arnfjörð Bjarmason:\n> \n> On Sun, Mar 27 2022, Johannes Sixt wrote:\n> \n>> Am 26.03.22 um 18:14 schrieb Ævar Arnfjörð Bjarmason:\n>>> Partially revert d323c6b6410 (i18n: git-sh-setup.sh: mark strings for\n>>> translation, 2016-06-17).\n>>>\n>>> These strings are no longer used in-tree, and we shouldn't be wasting\n>>> translator time on them for the benefit of a hypothetical out-of-tree\n>>> user of git-sh-setup.sh.\n>>\n>> There is public documentation for these functions. Hence, you must\n>> assume that they are used in scripts outside of Git. Castrating their\n>> functionality like this patch does is unacceptable.\n> \n> For require_clean_work_tree() the public documentation for this function\n> states that it will emit a specific error message in English, and you're\n> expected to Lego-interpolate a string that we'll concatenate with it:\n> \n> \t[...]It emits an error message of the form `Cannot\n>         <action>: <reason>. <hint>`, and dies.  Example:\n> \t+\n> \t----------------\n> \trequire_clean_work_tree rebase \"Please commit or stash them.\"\n> \n> So I think that marking it for translation like this as d323c6b6410 was\n> always broken in that it broke that documented promise.\n\nI can buy this argument. But then this must be a separate commit with\nthis justification.\n\n> But that's just an argument for keeping the require_clean_work_tree()\n> part of this patch, not require_work_tree_exists().\n> \n> For that one and others in git-sh-setup we've never said that we'd\n> provide these translated (and to the extent we've implied anything about\n> the rest, have strongly implied the opposite with\n> require_clean_work_tree()'s docs).\n> \n> Nothing will break for out-of-tree users as a result of this\n> change. When we added these functions and their documentation their\n> output wouldn't be translated, then sometimes it was, now it's not\n> again.\n\nThis does not sound convincing at all, but rather like \"I want the code\nto be so, and here is some handwaving to justify it\". What is wrong with\nthe status quo?\n\n> We need also need to be mindful of translator time, it's a *lot* of\n> strings to go through, and e.g. I've commented in the past on patches\n> that marked stuff in t/helper/ for translation.\n\nTranslator's time is your concern? No translator sifts through 5000\nstrings on every release. There are tools that show only new strings to\ntranslate. A text is translated once and then it lies under the radar\nuntil someone changes it. Don't tell me that is time-consuming. On the\nother hand, there is a lot of *reviewer* time that you are spending with\nchanges like this. *That* should be your concern.\n\n-- Hannes\n"},{"id":"452465","messageId":"220328.86lewudzw3.gmgdl@evledraar.gmail.com","threadId":"56941","inReplyTo":"63bf6e97-1dca-c2b1-5673-301039e73acf@kdbg.org","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-28T12:16:21Z","receivedAt":"2022-03-28T12:29:09Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Mar 28 2022, Johannes Sixt wrote:\n\n> Am 27.03.22 um 13:15 schrieb Ævar Arnfjörð Bjarmason:\n>> \n>> On Sun, Mar 27 2022, Johannes Sixt wrote:\n>> \n>>> Am 26.03.22 um 18:14 schrieb Ævar Arnfjörð Bjarmason:\n>>>> Partially revert d323c6b6410 (i18n: git-sh-setup.sh: mark strings for\n>>>> translation, 2016-06-17).\n>>>>\n>>>> These strings are no longer used in-tree, and we shouldn't be wasting\n>>>> translator time on them for the benefit of a hypothetical out-of-tree\n>>>> user of git-sh-setup.sh.\n>>>\n>>> There is public documentation for these functions. Hence, you must\n>>> assume that they are used in scripts outside of Git. Castrating their\n>>> functionality like this patch does is unacceptable.\n>> \n>> For require_clean_work_tree() the public documentation for this function\n>> states that it will emit a specific error message in English, and you're\n>> expected to Lego-interpolate a string that we'll concatenate with it:\n>> \n>> \t[...]It emits an error message of the form `Cannot\n>>         <action>: <reason>. <hint>`, and dies.  Example:\n>> \t+\n>> \t----------------\n>> \trequire_clean_work_tree rebase \"Please commit or stash them.\"\n>> \n>> So I think that marking it for translation like this as d323c6b6410 was\n>> always broken in that it broke that documented promise.\n>\n> I can buy this argument. But then this must be a separate commit with\n> this justification.\n\nSure, I can elaborate on that point & split it up.\n\n>> But that's just an argument for keeping the require_clean_work_tree()\n>> part of this patch, not require_work_tree_exists().\n>> \n>> For that one and others in git-sh-setup we've never said that we'd\n>> provide these translated (and to the extent we've implied anything about\n>> the rest, have strongly implied the opposite with\n>> require_clean_work_tree()'s docs).\n>> \n>> Nothing will break for out-of-tree users as a result of this\n>> change. When we added these functions and their documentation their\n>> output wouldn't be translated, then sometimes it was, now it's not\n>> again.\n>\n> This does not sound convincing at all, but rather like \"I want the code\n> to be so, and here is some handwaving to justify it\". What is wrong with\n> the status quo?\n\nThe larger context for why I was looking at this again is that I'm\ntrying to slowly get us to the point where we can remove the\ni18n-in-shellscript entirtely.\n\nBut I thought that was a rather large digression for the commit message,\nand that these being both unused, and not something the \"public\" API\naffected ever promised it would do was sufficient.\n\n>> We need also need to be mindful of translator time, it's a *lot* of\n>> strings to go through, and e.g. I've commented in the past on patches\n>> that marked stuff in t/helper/ for translation.\n>\n> Translator's time is your concern? No translator sifts through 5000\n> strings on every release. There are tools that show only new strings to\n> translate.\n\nYes, I'm the person who added this entire i18n infrastructure to git, I\nknow how it works :)\n\n> A text is translated once and then it lies under the radar\n> until someone changes it. Don't tell me that is time-consuming.\n\nYes, individual orphaned strings aren't, but they add up.\n\nJust like having that \"USE_PIC\" comment in configure.ac isn't much of a\nbig deal, but it makes sense to clean up unused code, just as we're\nadding new code.\n\nI will say that your implicit proposal of keeping this forever instead\nis assuming that we won't have more translations for git, and every new\ntranslator will look at this.\n\nContext is critical for translators, so even if it's one string it's a\nstring you'll quickly grep for and find ... no uses for, and then likely\ngo hunting around for where it's used only to (hopefully, in that case)\nfind this thread. Better not to have it.\n\n> On the other hand, there is a lot of *reviewer* time that you are\n> spending with changes like this. *That* should be your concern.\n\nI'd think most of the that time, if any, will be spent on this\nsub-thread you started, so ... :)\n\nWhich isn't to say it shouldn't have been brought up, but from my\nperspective I was (and still am) making a rather small change that I\nthink won't harm anyone in practice, and gives us some incremental\ntidyness & contributes to an eventual large \"git rm git-sh-i18n.sh\" et\nal.\n\nBut on reflection I don't think it's worth worrying about, and we can\njust do this change.\n\n"},{"id":"452506","messageId":"507e1a83-d266-e832-8f62-e2402c97faa9@kdbg.org","threadId":"56941","inReplyTo":"220328.86lewudzw3.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2022-03-28T20:06:22Z","receivedAt":"2022-03-28T20:07:26Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 28.03.22 um 14:16 schrieb Ævar Arnfjörð Bjarmason:\n> On Mon, Mar 28 2022, Johannes Sixt wrote:\n>> What is wrong with\n>> the status quo?\n> \n> The larger context for why I was looking at this again is that I'm\n> trying to slowly get us to the point where we can remove the\n> i18n-in-shellscript entirtely.\n\nWhy? Again: what is wrong with the status quo?\n\n> Just like having that \"USE_PIC\" comment in configure.ac isn't much of a\n> big deal, but it makes sense to clean up unused code, just as we're\n> adding new code.\n\nThere is a difference between \"clean up unused code\" and \"change\nobservable behavior\".\n\n-- Hannes\n"},{"id":"452755","messageId":"patch-v4-1.6-fc55b203474-20220331T014349Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v4-0.6-00000000000-20220331T014349Z-avarab@gmail.com","subject":"[PATCH v4 1/6] run-command.h: remove always unused \"clean_on_exit_handler_cbdata\"","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-31T01:45:50Z","receivedAt":"2022-03-31T01:46:17Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove a \"struct child_process\" member added in\nac2fbaa674c (run-command: add clean_on_exit_handler, 2016-10-16), but\nwhich was never used.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n run-command.h | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/run-command.h b/run-command.h\nindex 07bed6c31b4..5bd0c933e80 100644\n--- a/run-command.h\n+++ b/run-command.h\n@@ -142,7 +142,6 @@ struct child_process {\n \tunsigned clean_on_exit:1;\n \tunsigned wait_after_clean:1;\n \tvoid (*clean_on_exit_handler)(struct child_process *process);\n-\tvoid *clean_on_exit_handler_cbdata;\n };\n \n #define CHILD_PROCESS_INIT { \\\n-- \n2.35.1.1561.ge8eddc63765\n\n"},{"id":"452756","messageId":"patch-v4-3.6-cf54976bbc4-20220331T014349Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v4-0.6-00000000000-20220331T014349Z-avarab@gmail.com","subject":"[PATCH v4 3/6] xdiff/xmacros.h: remove unused XDL_PTRFREE","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-31T01:45:52Z","receivedAt":"2022-03-31T01:46:20Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This macro was added in 3443546f6ef (Use a *real* built-in diff\ngenerator, 2006-03-24), but none of the xdiff code uses it, it uses\nxdl_free() directly.\n\nIf we need its functionality again we'll use the FREE_AND_NULL() macro\nadded in 481df65f4f7 (git-compat-util: add a FREE_AND_NULL() wrapper\naround free(ptr); ptr = NULL, 2017-06-15).\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n xdiff/xmacros.h | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/xdiff/xmacros.h b/xdiff/xmacros.h\nindex 2809a28ca96..ae4636c2477 100644\n--- a/xdiff/xmacros.h\n+++ b/xdiff/xmacros.h\n@@ -34,7 +34,6 @@\n #define XDL_ADDBITS(v,b)\t((v) + ((v) >> (b)))\n #define XDL_MASKBITS(b)\t\t((1UL << (b)) - 1)\n #define XDL_HASHLONG(v,b)\t(XDL_ADDBITS((unsigned long)(v), b) & XDL_MASKBITS(b))\n-#define XDL_PTRFREE(p) do { if (p) { xdl_free(p); (p) = NULL; } } while (0)\n #define XDL_LE32_PUT(p, v) \\\n do { \\\n \tunsigned char *__p = (unsigned char *) (p); \\\n-- \n2.35.1.1561.ge8eddc63765\n\n"},{"id":"452757","messageId":"patch-v4-4.6-a9b71c281c2-20220331T014349Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v4-0.6-00000000000-20220331T014349Z-avarab@gmail.com","subject":"[PATCH v4 4/6] pack-bitmap-write: remove unused bitmap_reset() function","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-31T01:45:53Z","receivedAt":"2022-03-31T01:46:23Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This function hasn't been used since 449fa5ee069 (pack-bitmap-write:\nignore BITMAP_FLAG_REUSE, 2020-12-08), which was a cleanup commit\nintending to get rid of the code around the reusing of bitmaps.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n ewah/bitmap.c | 5 -----\n ewah/ewok.h   | 1 -\n 2 files changed, 6 deletions(-)\n\ndiff --git a/ewah/bitmap.c b/ewah/bitmap.c\nindex 38a47c44db4..87d5cc8fa30 100644\n--- a/ewah/bitmap.c\n+++ b/ewah/bitmap.c\n@@ -216,11 +216,6 @@ int bitmap_is_subset(struct bitmap *self, struct bitmap *other)\n \treturn 0;\n }\n \n-void bitmap_reset(struct bitmap *bitmap)\n-{\n-\tmemset(bitmap->words, 0x0, bitmap->word_alloc * sizeof(eword_t));\n-}\n-\n void bitmap_free(struct bitmap *bitmap)\n {\n \tif (bitmap == NULL)\ndiff --git a/ewah/ewok.h b/ewah/ewok.h\nindex 66920965da1..7eb8b9b6301 100644\n--- a/ewah/ewok.h\n+++ b/ewah/ewok.h\n@@ -177,7 +177,6 @@ struct bitmap *bitmap_dup(const struct bitmap *src);\n void bitmap_set(struct bitmap *self, size_t pos);\n void bitmap_unset(struct bitmap *self, size_t pos);\n int bitmap_get(struct bitmap *self, size_t pos);\n-void bitmap_reset(struct bitmap *self);\n void bitmap_free(struct bitmap *self);\n int bitmap_equals(struct bitmap *self, struct bitmap *other);\n int bitmap_is_subset(struct bitmap *self, struct bitmap *other);\n-- \n2.35.1.1561.ge8eddc63765\n\n"},{"id":"452758","messageId":"patch-v4-5.6-69d32330716-20220331T014349Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v4-0.6-00000000000-20220331T014349Z-avarab@gmail.com","subject":"[PATCH v4 5/6] object-store.h: remove unused has_sha1_file*()","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-31T01:45:54Z","receivedAt":"2022-03-31T01:46:26Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"These macros were last used in 5d3679ee023 (sha1-file: drop\nhas_sha1_file(), 2019-01-07), so let's remove coccinelle migration\nrules added 9b45f499818 (object-store: prepare has_{sha1, object}_file\nto handle any repo, 2018-11-13), along with the compatibility macros\nthemselves.\n\nThe \"These functions..\" in the diff context and the general comment\nabout compatibility macros still applies to\n\"NO_THE_REPOSITORY_COMPATIBILITY_MACROS\" use just a few lines below\nthis, so let's keep the comment.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n contrib/coccinelle/the_repository.pending.cocci | 15 ---------------\n object-store.h                                  |  4 ----\n 2 files changed, 19 deletions(-)\n\ndiff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci\nindex 2ee702ecf7f..072ea0d9228 100644\n--- a/contrib/coccinelle/the_repository.pending.cocci\n+++ b/contrib/coccinelle/the_repository.pending.cocci\n@@ -11,21 +11,6 @@ expression G;\n + repo_read_object_file(the_repository,\n   E, F, G)\n \n-@@\n-expression E;\n-@@\n-- has_sha1_file(\n-+ repo_has_sha1_file(the_repository,\n-  E)\n-\n-@@\n-expression E;\n-expression F;\n-@@\n-- has_sha1_file_with_flags(\n-+ repo_has_sha1_file_with_flags(the_repository,\n-  E)\n-\n @@\n expression E;\n @@\ndiff --git a/object-store.h b/object-store.h\nindex bd2322ed8ce..53996018c11 100644\n--- a/object-store.h\n+++ b/object-store.h\n@@ -312,10 +312,6 @@ int has_object(struct repository *r, const struct object_id *oid,\n  * These functions can be removed once all callers have migrated to\n  * has_object() and/or oid_object_info_extended().\n  */\n-#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS\n-#define has_sha1_file_with_flags(sha1, flags) repo_has_sha1_file_with_flags(the_repository, sha1, flags)\n-#define has_sha1_file(sha1) repo_has_sha1_file(the_repository, sha1)\n-#endif\n int repo_has_object_file(struct repository *r, const struct object_id *oid);\n int repo_has_object_file_with_flags(struct repository *r,\n \t\t\t\t    const struct object_id *oid, int flags);\n-- \n2.35.1.1561.ge8eddc63765\n\n"},{"id":"452759","messageId":"patch-v4-6.6-f477389c275-20220331T014349Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v4-0.6-00000000000-20220331T014349Z-avarab@gmail.com","subject":"[PATCH v4 6/6] alloc.[ch]: remove alloc_report() function","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-31T01:45:55Z","receivedAt":"2022-03-31T01:46:28Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"The alloc_report() function has been orphaned since its introduction\nin 855419f764a (Add specialized object allocator, 2006-06-19), it\nappears to have been used for demonstration purposes in that commit\nmessage.\n\nThese might be handy to manually use in a debugger, but keeping them\nand the \"count\" member of \"alloc_state\" just for that doesn't seem\nworth it.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n alloc.c | 21 ---------------------\n alloc.h |  1 -\n 2 files changed, 22 deletions(-)\n\ndiff --git a/alloc.c b/alloc.c\nindex 957a0af3626..27f697e4c87 100644\n--- a/alloc.c\n+++ b/alloc.c\n@@ -27,7 +27,6 @@ union any_object {\n };\n \n struct alloc_state {\n-\tint count; /* total number of nodes allocated */\n \tint nr;    /* number of nodes left in current allocation */\n \tvoid *p;   /* first free node in current allocation */\n \n@@ -63,7 +62,6 @@ static inline void *alloc_node(struct alloc_state *s, size_t node_size)\n \t\ts->slabs[s->slab_nr++] = s->p;\n \t}\n \ts->nr--;\n-\ts->count++;\n \tret = s->p;\n \ts->p = (char *)s->p + node_size;\n \tmemset(ret, 0, node_size);\n@@ -122,22 +120,3 @@ void *alloc_commit_node(struct repository *r)\n \tinit_commit_node(c);\n \treturn c;\n }\n-\n-static void report(const char *name, unsigned int count, size_t size)\n-{\n-\tfprintf(stderr, \"%10s: %8u (%\"PRIuMAX\" kB)\\n\",\n-\t\t\tname, count, (uintmax_t) size);\n-}\n-\n-#define REPORT(name, type)\t\\\n-    report(#name, r->parsed_objects->name##_state->count, \\\n-\t\t  r->parsed_objects->name##_state->count * sizeof(type) >> 10)\n-\n-void alloc_report(struct repository *r)\n-{\n-\tREPORT(blob, struct blob);\n-\tREPORT(tree, struct tree);\n-\tREPORT(commit, struct commit);\n-\tREPORT(tag, struct tag);\n-\tREPORT(object, union any_object);\n-}\ndiff --git a/alloc.h b/alloc.h\nindex 371d388b552..3f4a0ad310a 100644\n--- a/alloc.h\n+++ b/alloc.h\n@@ -13,7 +13,6 @@ void init_commit_node(struct commit *c);\n void *alloc_commit_node(struct repository *r);\n void *alloc_tag_node(struct repository *r);\n void *alloc_object_node(struct repository *r);\n-void alloc_report(struct repository *r);\n \n struct alloc_state *allocate_alloc_state(void);\n void clear_alloc_state(struct alloc_state *s);\n-- \n2.35.1.1561.ge8eddc63765\n\n"},{"id":"452760","messageId":"patch-v4-2.6-f6125e9f62a-20220331T014349Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v4-0.6-00000000000-20220331T014349Z-avarab@gmail.com","subject":"[PATCH v4 2/6] configure.ac: remove USE_PIC comment","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-31T01:45:51Z","receivedAt":"2022-03-31T01:46:29Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove a comment about a Makefile knob that was removed in\nf7661ce0b8e (Remove -fPIC which was only needed for Git.xs,\n2006-09-29). The comment had been copied over to configure.ac in\n633b423961d (Copy description of build configuration variables to\nconfigure.ac, 2006-07-08).\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n configure.ac | 3 ---\n 1 file changed, 3 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 6bd6bef1c44..789dcde3eae 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -1189,9 +1189,6 @@ AC_COMPILE_IFELSE([BSD_SYSCTL_SRC],\n GIT_CONF_SUBST([HAVE_BSD_SYSCTL])\n \n ## Other checks.\n-# Define USE_PIC if you need the main git objects to be built with -fPIC\n-# in order to build and link perl/Git.so.  x86-64 seems to need this.\n-#\n # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.\n # Enable it on Windows.  By default, symrefs are still used.\n #\n-- \n2.35.1.1561.ge8eddc63765\n\n"},{"id":"452761","messageId":"cover-v4-0.6-00000000000-20220331T014349Z-avarab@gmail.com","threadId":"56941","inReplyTo":"cover-v3-0.7-00000000000-20220326T171200Z-avarab@gmail.com","subject":"[PATCH v4 0/6] various: remove dead code","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-31T01:45:49Z","receivedAt":"2022-03-31T01:46:33Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This v4 drops the last patch of the v3. I'll address git-sh-i18n.sh in\nsome future topic, the rest of these should all be uncontroversial.\n\nÆvar Arnfjörð Bjarmason (6):\n  run-command.h: remove always unused \"clean_on_exit_handler_cbdata\"\n  configure.ac: remove USE_PIC comment\n  xdiff/xmacros.h: remove unused XDL_PTRFREE\n  pack-bitmap-write: remove unused bitmap_reset() function\n  object-store.h: remove unused has_sha1_file*()\n  alloc.[ch]: remove alloc_report() function\n\n alloc.c                                       | 21 -------------------\n alloc.h                                       |  1 -\n configure.ac                                  |  3 ---\n .../coccinelle/the_repository.pending.cocci   | 15 -------------\n ewah/bitmap.c                                 |  5 -----\n ewah/ewok.h                                   |  1 -\n object-store.h                                |  4 ----\n run-command.h                                 |  1 -\n xdiff/xmacros.h                               |  1 -\n 9 files changed, 52 deletions(-)\n\nRange-diff against v3:\n1:  bac78566135 = 1:  fc55b203474 run-command.h: remove always unused \"clean_on_exit_handler_cbdata\"\n2:  93dc689e1aa = 2:  f6125e9f62a configure.ac: remove USE_PIC comment\n3:  05adde5b9e4 = 3:  cf54976bbc4 xdiff/xmacros.h: remove unused XDL_PTRFREE\n4:  6bd89f3cf42 = 4:  a9b71c281c2 pack-bitmap-write: remove unused bitmap_reset() function\n5:  cf7969f8f67 = 5:  69d32330716 object-store.h: remove unused has_sha1_file*()\n6:  b60a4c24a28 = 6:  f477389c275 alloc.[ch]: remove alloc_report() function\n7:  7a82b1fd005 < -:  ----------- git-sh-setup: don't mark trees not used in-tree for i18n\n-- \n2.35.1.1561.ge8eddc63765\n\n"},{"id":"452785","messageId":"45c963da-19a5-de51-34d4-5b29f461c9ec@gmail.com","threadId":"56941","inReplyTo":"220328.86lewudzw3.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2022-03-31T10:23:22Z","receivedAt":"2022-03-31T10:23:32Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Ævar\n\nOn 28/03/2022 13:16, Ævar Arnfjörð Bjarmason wrote:\n> \n> On Mon, Mar 28 2022, Johannes Sixt wrote:\n> \n>> Am 27.03.22 um 13:15 schrieb Ævar Arnfjörð Bjarmason:\n>>>\n>>> On Sun, Mar 27 2022, Johannes Sixt wrote:\n>>>\n>>>> Am 26.03.22 um 18:14 schrieb Ævar Arnfjörð Bjarmason:\n>>>>> Partially revert d323c6b6410 (i18n: git-sh-setup.sh: mark strings for\n>>>>> translation, 2016-06-17).\n>>>>>\n>>>>> These strings are no longer used in-tree, and we shouldn't be wasting\n>>>>> translator time on them for the benefit of a hypothetical out-of-tree\n>>>>> user of git-sh-setup.sh.\n\nThe out of tree users of git-sh-setup.sh are not hypothetical, they \nexist and objected when you recently tried to remove these functions \nentirely[1].\n\n>>>> There is public documentation for these functions. Hence, you must\n>>>> assume that they are used in scripts outside of Git. Castrating their\n>>>> functionality like this patch does is unacceptable.\n>>>\n>>> For require_clean_work_tree() the public documentation for this function\n>>> states that it will emit a specific error message in English, and you're\n>>> expected to Lego-interpolate a string that we'll concatenate with it:\n\nThe documentation does not say whether the message is translated or not, \nprobably because it was not updated when the translations were added six \nyears ago.\n\n>>> \t[...]It emits an error message of the form `Cannot\n>>>          <action>: <reason>. <hint>`, and dies.  Example:\n\nThis is not a promising a \"specific error message in English\"\n\n>>> \t+\n>>> \t----------------\n>>> \trequire_clean_work_tree rebase \"Please commit or stash them.\"\n\nThis is an example message you cannot use that to argue that we will \nalways show a message in English\n\n>>> So I think that marking it for translation like this as d323c6b6410 was\n>>> always broken in that it broke that documented promise.\n>>\n>> I can buy this argument. But then this must be a separate commit with\n>> this justification.\n> \n> Sure, I can elaborate on that point & split it up.\n> \n>>> But that's just an argument for keeping the require_clean_work_tree()\n>>> part of this patch, not require_work_tree_exists().\n>>>\n>>> For that one and others in git-sh-setup we've never said that we'd\n>>> provide these translated (and to the extent we've implied anything about\n>>> the rest, have strongly implied the opposite with\n>>> require_clean_work_tree()'s docs).\n>>>\n>>> Nothing will break for out-of-tree users as a result of this\n>>> change.\n\nThe strings the user sees will change\n\n>>> When we added these functions and their documentation their\n>>> output wouldn't be translated,\n\nWhere does the documentation say \"the output will not be translated\"?\n\n>>> then sometimes it was, now it's not\n>>> again.\n>>\n>> This does not sound convincing at all, but rather like \"I want the code\n>> to be so, and here is some handwaving to justify it\". What is wrong with\n>> the status quo?\n> \n> The larger context for why I was looking at this again is that I'm\n> trying to slowly get us to the point where we can remove the\n> i18n-in-shellscript entirtely.\n> \n> But I thought that was a rather large digression for the commit message,\n> and that these being both unused, and not something the \"public\" API\n> affected ever promised it would do was sufficient.\n\nI think if that is what you want to do then you should propose a series \nthat does just that and explains why it is desirable, rather than coming \nup with other reasons to justify the changes you want.\n\n>>> We need also need to be mindful of translator time, it's a *lot* of\n>>> strings to go through, and e.g. I've commented in the past on patches\n>>> that marked stuff in t/helper/ for translation.\n>>\n>> Translator's time is your concern? No translator sifts through 5000\n>> strings on every release. There are tools that show only new strings to\n>> translate.\n> \n> Yes, I'm the person who added this entire i18n infrastructure to git, I\n> know how it works :)\n> \n>> A text is translated once and then it lies under the radar\n>> until someone changes it. Don't tell me that is time-consuming.\n> \n> Yes, individual orphaned strings aren't, but they add up.\n> \n> Just like having that \"USE_PIC\" comment in configure.ac isn't much of a\n> big deal, but it makes sense to clean up unused code, just as we're\n> adding new code.\n> \n> I will say that your implicit proposal of keeping this forever instead\n> is assuming that we won't have more translations for git, and every new\n> translator will look at this.\n> \n> Context is critical for translators, so even if it's one string it's a\n> string you'll quickly grep for and find ... no uses for, and then likely\n> go hunting around for where it's used only to (hopefully, in that case)\n> find this thread. Better not to have it.\n> \n>> On the other hand, there is a lot of *reviewer* time that you are\n>> spending with changes like this. *That* should be your concern.\n> \n> I'd think most of the that time, if any, will be spent on this\n> sub-thread you started, so ... :)\n\nThis sub-tread exists because you posted this patch to the mailing list. \nBlaming reviewers for asking perfectly reasonable questions is neither \nfair nor helpful.\n\nThis patch does not remove dead code as the rest of the series does but \ninstead changes user facing messages in code that we recently \nestablished is part of the public api[2]. Nothing has changed since that \nrecent discussion so I'm confused as to why you are proposing to modify \nthe api again so soon.\n\nBest Wishes\n\nPhillip\n\n[1] \nhttps://lore.kernel.org/git/CAJm9OHfN9iXDt-rzu-wb=67y4PPpmCUgMfmZPy1JMBJkHG256g@mail.gmail.com/\n[2] https://lore.kernel.org/git/xmqq5yvik8bc.fsf@gitster.g/\n\n> Which isn't to say it shouldn't have been brought up, but from my\n> perspective I was (and still am) making a rather small change that I\n> think won't harm anyone in practice, and gives us some incremental\n> tidyness & contributes to an eventual large \"git rm git-sh-i18n.sh\" et\n> al.\n> \n> But on reflection I don't think it's worth worrying about, and we can\n> just do this change.\n> \n\n"},{"id":"452789","messageId":"220331.86a6d6qqfe.gmgdl@evledraar.gmail.com","threadId":"56941","inReplyTo":"45c963da-19a5-de51-34d4-5b29f461c9ec@gmail.com","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-31T11:15:05Z","receivedAt":"2022-03-31T12:04:17Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Mar 31 2022, Phillip Wood wrote:\n\n[tl;dr: Reply below, but this whole thing should be addressed by the v4\nI sent last night:\nhttps://lore.kernel.org/git/cover-v4-0.6-00000000000-20220331T014349Z-avarab@gmail.com/\n\nI.e. the controversial patch has been ejected].\n\n> On 28/03/2022 13:16, Ævar Arnfjörð Bjarmason wrote:\n>> On Mon, Mar 28 2022, Johannes Sixt wrote:\n>> \n>>> Am 27.03.22 um 13:15 schrieb Ævar Arnfjörð Bjarmason:\n>>>>\n>>>> On Sun, Mar 27 2022, Johannes Sixt wrote:\n>>>>\n>>>>> Am 26.03.22 um 18:14 schrieb Ævar Arnfjörð Bjarmason:\n>>>>>> Partially revert d323c6b6410 (i18n: git-sh-setup.sh: mark strings for\n>>>>>> translation, 2016-06-17).\n>>>>>>\n>>>>>> These strings are no longer used in-tree, and we shouldn't be wasting\n>>>>>> translator time on them for the benefit of a hypothetical out-of-tree\n>>>>>> user of git-sh-setup.sh.\n>\n> The out of tree users of git-sh-setup.sh are not hypothetical, they\n> exist and objected when you recently tried to remove these functions \n> entirely[1].\n\nI see that what I wrote there is ambiguous, but I'm aware of that &\nremember that thread. I meant to say the hypothetical user that cares\nabout the i18n these functions exposed.\n\n>>>>> There is public documentation for these functions. Hence, you must\n>>>>> assume that they are used in scripts outside of Git. Castrating their\n>>>>> functionality like this patch does is unacceptable.\n>>>>\n>>>> For require_clean_work_tree() the public documentation for this function\n>>>> states that it will emit a specific error message in English, and you're\n>>>> expected to Lego-interpolate a string that we'll concatenate with it:\n>\n> The documentation does not say whether the message is translated or\n> not, probably because it was not updated when the translations were\n> added six years ago.\n\nIt does say it. It uses the word \"Cannot\" at the beginning, and promises\nto emit that specific string.\n\nYes we didn't update it at the time for i18n, and probably should.\n\nBut to the extent that the gordian knot in making any changes to these\nwhatsoever is because they've been publicly documented I don't think\nanyone using these has been promised different behavior. So it's highly\nrelevant here.\n\n>>>> \t[...]It emits an error message of the form `Cannot\n>>>>          <action>: <reason>. <hint>`, and dies.  Example:\n>\n> This is not a promising a \"specific error message in English\"\n\nIt really is. You cannot use this API to produce sensible output in any\nother language. It was used like this:\n\n    require_clean_work_tree \"pull with rebase\" \"Please commit or stash them.\"\n\nFor which we'd emit:\n\n    Cannot pull with rebase: You have unstaged changes.\n\n    Please commit or stash them.\n\nYou can see e.g. in the Bulgarian translation that this was dealt with\nby putting the interpolated string in double-quotes.\n\n>>>> \t+\n>>>> \t----------------\n>>>> \trequire_clean_work_tree rebase \"Please commit or stash them.\"\n>\n> This is an example message you cannot use that to argue that we will\n> always show a message in English\n\nI'm saying that the documentation says it emits English, that it didn't\nalways do that, and now does so again.\n\nAnd that to get it to emit anything sensible in cases where we're not\nunder LC_ALL=C would have required 1=1 matching the behavior of whatever\nshellscript is using this to what git-sh-i18n in picking the locale.\n\nI don't think it's plausible that there's an out-of-tree user\nmaintaining their own set of i18n'd po/ files which expect to interact\nwith our translations in this way.\n\nAny out-of-tree user of this (if they're using this at all) will either\nnot care, or they'll see more sensible output again.\n\n>>>> So I think that marking it for translation like this as d323c6b6410 was\n>>>> always broken in that it broke that documented promise.\n>>>\n>>> I can buy this argument. But then this must be a separate commit with\n>>> this justification.\n>> Sure, I can elaborate on that point & split it up.\n>> \n>>>> But that's just an argument for keeping the require_clean_work_tree()\n>>>> part of this patch, not require_work_tree_exists().\n>>>>\n>>>> For that one and others in git-sh-setup we've never said that we'd\n>>>> provide these translated (and to the extent we've implied anything about\n>>>> the rest, have strongly implied the opposite with\n>>>> require_clean_work_tree()'s docs).\n>>>>\n>>>> Nothing will break for out-of-tree users as a result of this\n>>>> change.\n>\n> The strings the user sees will change\n\nYes, and I'll admit that \"nothing will break here\" on my part isn't the\nsame as saying \"there will be no observable change whatsoever\". Sorry\nabout being unclear there.\n\nAs a general matter we don't promise that such strings won't change,\neven for die(), error() etc. messages emitted by plumbing commands.\n\nExcept in some rare cases where they've been known to be used out of\ntree extensively, e.g. the human-readable \"merge\" messages where we\nhave/had no other API to expose the same information.\n\nOr, in the case of plumbing output where such strings are part of the\nAPI contract.\n\nBut for these commands in the \"Internal helper commands\" category I\nthink this fall squarely in the category of changing a random error(),\ndie() etc. in the C code (which we do quite freely).\n\n>>>> When we added these functions and their documentation their\n>>>> output wouldn't be translated,\n>\n> Where does the documentation say \"the output will not be translated\"?\n\nI think this was covered above, it's sufficient that it didn't promise\nthat it would be, and in the one case where we discuss it in passing\nwith an example we imply that it won't be.\n\n>>>> then sometimes it was, now it's not\n>>>> again.\n>>>\n>>> This does not sound convincing at all, but rather like \"I want the code\n>>> to be so, and here is some handwaving to justify it\". What is wrong with\n>>> the status quo?\n>> The larger context for why I was looking at this again is that I'm\n>> trying to slowly get us to the point where we can remove the\n>> i18n-in-shellscript entirtely.\n>> But I thought that was a rather large digression for the commit\n>> message,\n>> and that these being both unused, and not something the \"public\" API\n>> affected ever promised it would do was sufficient.\n>\n> I think if that is what you want to do then you should propose a\n> series that does just that and explains why it is desirable, rather\n> than coming up with other reasons to justify the changes you want.\n\nJust because I start looking at some code for reason X that doesn't mean\nthat submitting a patch with rationale Y isn't a sufficient reason to\nmake that change.\n\nI still think that in this case that they're not used by our own i18n\neffort is a perfectly sufficient reason to make the change, as we won't\nwaste translator time in it. I.e. I'll still stand behind the stated\nrationale.\n\nBut aside from that most changes I made to git are with an eye to some\nlarger semi-related goal.\n\nI do have some WIP changes to tear down most of the *.sh and *.perl i18n\ninfrastructure (the parts still in use would still have translations),\nand IIRC it's at least a 2k line negative diffstat, and enables us to do\nmore interesting things in i18n (e.g. getting rid of the libintl\ndependency).\n\nBut I also don't think that such a series is probably not possible in\nthe near term if we're going to insist that all shellscript output must\nbyte-for-byte be the same (for boring reasons I won't go into, but it's\nmainly to do with sh-i18n--envsubst.c).\n\nSo it's also a bit of a chicke & egg problem. I wanted to send any such\nUI changes in first, to see if it was even worth finishing up that work,\nor if the whole thing would stall on not being able to change some\noutput someone somewhere might have relied on being byte-for-byte the\nsame.\n\n>>>> We need also need to be mindful of translator time, it's a *lot* of\n>>>> strings to go through, and e.g. I've commented in the past on patches\n>>>> that marked stuff in t/helper/ for translation.\n>>>\n>>> Translator's time is your concern? No translator sifts through 5000\n>>> strings on every release. There are tools that show only new strings to\n>>> translate.\n>> Yes, I'm the person who added this entire i18n infrastructure to\n>> git, I\n>> know how it works :)\n>> \n>>> A text is translated once and then it lies under the radar\n>>> until someone changes it. Don't tell me that is time-consuming.\n>> Yes, individual orphaned strings aren't, but they add up.\n>> Just like having that \"USE_PIC\" comment in configure.ac isn't much\n>> of a\n>> big deal, but it makes sense to clean up unused code, just as we're\n>> adding new code.\n>> I will say that your implicit proposal of keeping this forever\n>> instead\n>> is assuming that we won't have more translations for git, and every new\n>> translator will look at this.\n>> Context is critical for translators, so even if it's one string it's\n>> a\n>> string you'll quickly grep for and find ... no uses for, and then likely\n>> go hunting around for where it's used only to (hopefully, in that case)\n>> find this thread. Better not to have it.\n>> \n>>> On the other hand, there is a lot of *reviewer* time that you are\n>>> spending with changes like this. *That* should be your concern.\n>> I'd think most of the that time, if any, will be spent on this\n>> sub-thread you started, so ... :)\n>\n> This sub-tread exists because you posted this patch to the mailing\n> list. Blaming reviewers for asking perfectly reasonable questions is\n> neither fair nor helpful.\n\nI didn't mean any offense there, but did mean to suggest (smiley an all)\nthat a mountain was being made out a molehill in this case.\n\nYes translator time is my concern. I started the i18n effort in git, and\nI think it's really important. We currently have 18 translations of git\nin the po/ directory, 16 if you leave out \"dialects\". Which if you\ncompare it with\nhttps://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers\nis quite bad.\n\nFor comparison I worked extensively on MediaWiki in a past life, which\nat the time had at least 100 such translations. I looked again and it's\nup to around 600 (many incomplete, to be fair).\n\nIs that our fault as project? No, but we could definitely help it along.\n\nI value the scarcity of translator time (including future translations)\nmuch more than concerns that there *may be* someone somewhere who's got\na reliance on this particular output.\n\n> This patch does not remove dead code as the rest of the series does\n> but instead changes user facing messages in code that we recently \n> established is part of the public api[2]. Nothing has changed since\n> that recent discussion so I'm confused as to why you are proposing to\n> modify the api again so soon.\n\nAs noted above I don't think that previous discussion applies to these\nchanges as you describe, but in any case, ~8 hours before you sent this\nreply I sent a v4 re-roll which left out this change:\n\n    https://lore.kernel.org/git/cover-v4-0.6-00000000000-20220331T014349Z-avarab@gmail.com/\n\nWhich I hope will address your & Johannes Sixt's concerns here. Does the\nrest of this series look good to you?\n"},{"id":"452833","messageId":"12c7c651-49d2-d38b-122a-3fb5c29e94df@kdbg.org","threadId":"56941","inReplyTo":"220331.86a6d6qqfe.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2022-03-31T20:27:11Z","receivedAt":"2022-03-31T20:27:21Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 31.03.22 um 13:15 schrieb Ævar Arnfjörð Bjarmason:\n> I do have some WIP changes to tear down most of the *.sh and *.perl i18n\n> infrastructure (the parts still in use would still have translations),\n> and IIRC it's at least a 2k line negative diffstat, and enables us to do\n> more interesting things in i18n (e.g. getting rid of the libintl\n> dependency).\n\nWhy? Why? Why? Does the status quo have a problem somewhere? All this\nsounds like a change for the sake of change.\n\n> But I also don't think that such a series is probably not possible in\n> the near term if we're going to insist that all shellscript output must\n> byte-for-byte be the same (for boring reasons I won't go into, but it's\n> mainly to do with sh-i18n--envsubst.c).\n\nSuch an insistence can easily be lifted if the change is justified\nsufficiently. I haven't seen such a justification, yet.\n\n-- Hannes\n"},{"id":"452841","messageId":"xmqqh77dzso8.fsf@gitster.g","threadId":"56941","inReplyTo":"patch-v4-1.6-fc55b203474-20220331T014349Z-avarab@gmail.com","subject":"Re: [PATCH v4 1/6] run-command.h: remove always unused \"clean_on_exit_handler_cbdata\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-03-31T22:03:03Z","receivedAt":"2022-03-31T22:03:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> Remove a \"struct child_process\" member added in\n> ac2fbaa674c (run-command: add clean_on_exit_handler, 2016-10-16), but\n> which was never used.\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n>  run-command.h | 1 -\n>  1 file changed, 1 deletion(-)\n>\n> diff --git a/run-command.h b/run-command.h\n> index 07bed6c31b4..5bd0c933e80 100644\n> --- a/run-command.h\n> +++ b/run-command.h\n> @@ -142,7 +142,6 @@ struct child_process {\n>  \tunsigned clean_on_exit:1;\n>  \tunsigned wait_after_clean:1;\n>  \tvoid (*clean_on_exit_handler)(struct child_process *process);\n> -\tvoid *clean_on_exit_handler_cbdata;\n>  };\n>  \n>  #define CHILD_PROCESS_INIT { \\\n\nThanks for digging.  Looks good.\n"},{"id":"452842","messageId":"xmqqczi1zsi6.fsf@gitster.g","threadId":"56941","inReplyTo":"patch-v4-4.6-a9b71c281c2-20220331T014349Z-avarab@gmail.com","subject":"Re: [PATCH v4 4/6] pack-bitmap-write: remove unused bitmap_reset() function","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-03-31T22:06:41Z","receivedAt":"2022-03-31T22:06:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> This function hasn't been used since 449fa5ee069 (pack-bitmap-write:\n> ignore BITMAP_FLAG_REUSE, 2020-12-08), which was a cleanup commit\n> intending to get rid of the code around the reusing of bitmaps.\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n>  ewah/bitmap.c | 5 -----\n>  ewah/ewok.h   | 1 -\n>  2 files changed, 6 deletions(-)\n>\n> diff --git a/ewah/bitmap.c b/ewah/bitmap.c\n> index 38a47c44db4..87d5cc8fa30 100644\n> --- a/ewah/bitmap.c\n> +++ b/ewah/bitmap.c\n> @@ -216,11 +216,6 @@ int bitmap_is_subset(struct bitmap *self, struct bitmap *other)\n>  \treturn 0;\n>  }\n>  \n> -void bitmap_reset(struct bitmap *bitmap)\n> -{\n> -\tmemset(bitmap->words, 0x0, bitmap->word_alloc * sizeof(eword_t));\n> -}\n> -\n\nIt is kind of surprising that we used to want to \"clear\" a bitmap\narray but no longer do so (read: \"we may not use it right now, but\nwill we soon miss it?\"), but the code removed here is simple,\nobvious and trivial enough that anybody we does want to use it can\neasily reinvent it.\n\nSo far, all patches look quite sensible.\n\nThanks.\n\n\n\n>  void bitmap_free(struct bitmap *bitmap)\n>  {\n>  \tif (bitmap == NULL)\n> diff --git a/ewah/ewok.h b/ewah/ewok.h\n> index 66920965da1..7eb8b9b6301 100644\n> --- a/ewah/ewok.h\n> +++ b/ewah/ewok.h\n> @@ -177,7 +177,6 @@ struct bitmap *bitmap_dup(const struct bitmap *src);\n>  void bitmap_set(struct bitmap *self, size_t pos);\n>  void bitmap_unset(struct bitmap *self, size_t pos);\n>  int bitmap_get(struct bitmap *self, size_t pos);\n> -void bitmap_reset(struct bitmap *self);\n>  void bitmap_free(struct bitmap *self);\n>  int bitmap_equals(struct bitmap *self, struct bitmap *other);\n>  int bitmap_is_subset(struct bitmap *self, struct bitmap *other);\n"},{"id":"452955","messageId":"220402.86r16fn2bx.gmgdl@evledraar.gmail.com","threadId":"56941","inReplyTo":"12c7c651-49d2-d38b-122a-3fb5c29e94df@kdbg.org","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-04-02T10:44:01Z","receivedAt":"2022-04-02T11:37:29Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Mar 31 2022, Johannes Sixt wrote:\n\n> Am 31.03.22 um 13:15 schrieb Ævar Arnfjörð Bjarmason:\n>> I do have some WIP changes to tear down most of the *.sh and *.perl i18n\n>> infrastructure (the parts still in use would still have translations),\n>> and IIRC it's at least a 2k line negative diffstat, and enables us to do\n>> more interesting things in i18n (e.g. getting rid of the libintl\n>> dependency).\n>\n> Why? Why? Why? Does the status quo have a problem somewhere? All this\n> sounds like a change for the sake of change.\n\nSo this is quite the digression, but, hey, you asked for it.\n\nWe don't have translations universally available because libintl is a\nrather heavy thing to ship.\n\nI don't personally mind linking against it for my own builds, but grep\nfor NO_GETTEXT in our tree & history for some of the workarounds.\n\nWe're also heading towards being able to build a stand-alone git binary\nfor most things, which makes shipping in various setups much easier, but\nlibintl is more of an \"old-school\" *nix library.\n\nYou need to ferry around auxilliary *.mo files, and for the *.sh and\n*.perl translations we need gettext.sh, /usr/bin/gettext and\nLocale::Messages (and everything that brings in).\n\nI'd like translations for Git to Just Work, including if you're in some\nrandom docker image with someone's home-built git. Giving people fewer\nreasons to enable it improves accessibility. A lot of people who use git\nare not on their own personal laptop, but on some setup (corporate, CI\netc.) that they don't fully control.\n\nThe gettext model & libintl is also just bad at various use-cases I\nthink would make sense to support.\n\nE.g. having a configurable option to emit output in two languages at the\nsame time, either because you'd both like to understand the output &\ne.g. search errors online, or you'd understand more from a union of say\nGerman an English than from just one or the other.\n\nFor libintl you need'd to juggle setlocale() in the middle of your\nunderlying sprintf implementation to do that, or pull other shenanigans\nof bypassing its API (e.g. directly reading the *.mo files), which\npretty much amounts to the same thing.\n\nSo essentially I wanted to hack up something that would just\npost-process output like this:\n\n    msgunfmt --strict -s -w 0 -i -E --color=always po/build/locale/de/LC_MESSAGES/git.mo\n\nAnd turn it into a lang-de.c file, for which we'd make a lang-de.o that\nwe'd link in. And then either binary search through it, or just generate\ncode we'd compile (one really big switch/case statement).\n\nNow, if you count the number of messages we translate in *.sh land on\nyour digits you won't even need to use all of our toes, and for the\n*.perl it's similar, especially with add--interactive.perl going away\nany day now.\n\nThere isn't any fundamental obstacle to making such a thing portable to\n*.sh and *.perl, but having gotten that particular interop working once\nin the past needing to do that again would bring this (I think\nworthwhile) project from a \"maybe someday\" to \"nah\".\n\n>> But I also don't think that such a series is probably not possible in\n>> the near term if we're going to insist that all shellscript output must\n>> byte-for-byte be the same (for boring reasons I won't go into, but it's\n>> mainly to do with sh-i18n--envsubst.c).\n>\n> Such an insistence can easily be lifted if the change is justified\n> sufficiently. I haven't seen such a justification, yet.\n\nSure, but re the \"chicken & egg\" problem I might do all the work to do\nall that, and someone such as yourself might rightly point out that it\nwould break someone's obscure use-case, scuttling the whole thing.\n\nWhich isn't an exaggeration b.t.w., if you e.g. look through our\nremaining gettext.sh usage you'll find that we carry the entirety of\nsh-i18n--ensubst.c and everything around it (at least ~1k lines) for\nemitting a single word in a single message in git-sh-setup.sh, that's\nit.\n\nBecause the whole reason eval_gettext exists, and everything to support\nit, is to support the use-case of feeding *arbitrary input* into the\ntranslation engine, i.e. not the string you yourself have in your source\ncode & trust (it avoids shell \"eval\").\n\nBut if you think that's of paramount importance (that word is \"usage\"\nb.t.w., and the equivalent in usage.c isn't even translated) there\nwouldn't be any way to make forward progress towards the next step of\nmaking the remaining shellscript translations call some \"git sh--i18n\"\nhelper to get their output.\n\nSo, to the extent that I was going to pursue the above plan at all I\nwanted to do it in small steps, especially now as git-submodule.sh et al\nare going away.\n\nSo.\n\nIt would be nice to get some leeway in some areas, especially for\nsomething like this where I implemented this entire i18n system to begin\nwith, so I'd think it would be clear that it's not some drive-by\ncontribution. I clearly care about the end-goal, and have been sticking\nwith this particular topic for more than a decade.\n\nNot everything can always be a single atomically understood patch that\ncarries all possible reasons to make the change with it, some things are\nmore of a longer term incremental effort.\n\nAnd since we all have limited time on this spinning ball of mud\nsometimes it can make sense to trickle in initial changes to see if some\nlarger end-goal is even attainable, or will be blocked due to some\nunforeseen (or underestimated) reasons.\n\nThanks.\n"},{"id":"452957","messageId":"cc9aaba3-6904-4f96-db50-a368b9d9f0f2@kdbg.org","threadId":"56941","inReplyTo":"220402.86r16fn2bx.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2022-04-02T14:16:41Z","receivedAt":"2022-04-02T14:16:50Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 02.04.22 um 12:44 schrieb Ævar Arnfjörð Bjarmason:\n> \n> On Thu, Mar 31 2022, Johannes Sixt wrote:\n> \n>> Am 31.03.22 um 13:15 schrieb Ævar Arnfjörð Bjarmason:\n>>> I do have some WIP changes to tear down most of the *.sh and *.perl i18n\n>>> infrastructure (the parts still in use would still have translations),\n>>> and IIRC it's at least a 2k line negative diffstat, and enables us to do\n>>> more interesting things in i18n (e.g. getting rid of the libintl\n>>> dependency).\n>>\n>> Why? Why? Why? Does the status quo have a problem somewhere? All this\n>> sounds like a change for the sake of change.\n> \n> So this is quite the digression, but, hey, you asked for it.\n\nOh, no, this is not a digression *at all*. What your write below is the\nkind of text that is needed to judge the value of a change. Without it,\na change that does not have an otherwise obvious improvement[*] is just\nfor the change's sake.\n\n[*] In my book, getting rid of a libintl dependency is not an obvious\nimprovement. I may be biased in this case, because that dependency was\nnever a problem for me. Might be because my personal builds all have\nNO_GETTEXT set.\n\n> We don't have translations universally available because libintl is a\n> rather heavy thing to ship.\n> \n> I don't personally mind linking against it for my own builds, but grep\n> for NO_GETTEXT in our tree & history for some of the workarounds.\n> \n> We're also heading towards being able to build a stand-alone git binary\n> for most things, which makes shipping in various setups much easier, but\n> libintl is more of an \"old-school\" *nix library.\n> \n> You need to ferry around auxilliary *.mo files, and for the *.sh and\n> *.perl translations we need gettext.sh, /usr/bin/gettext and\n> Locale::Messages (and everything that brings in).\n> \n> I'd like translations for Git to Just Work, including if you're in some\n> random docker image with someone's home-built git. Giving people fewer\n> reasons to enable it improves accessibility. A lot of people who use git\n> are not on their own personal laptop, but on some setup (corporate, CI\n> etc.) that they don't fully control.\n> \n> The gettext model & libintl is also just bad at various use-cases I\n> think would make sense to support.\n> \n> E.g. having a configurable option to emit output in two languages at the\n> same time, either because you'd both like to understand the output &\n> e.g. search errors online, or you'd understand more from a union of say\n> German an English than from just one or the other.\n> \n> For libintl you need'd to juggle setlocale() in the middle of your\n> underlying sprintf implementation to do that, or pull other shenanigans\n> of bypassing its API (e.g. directly reading the *.mo files), which\n> pretty much amounts to the same thing.\n> \n> So essentially I wanted to hack up something that would just\n> post-process output like this:\n> \n>     msgunfmt --strict -s -w 0 -i -E --color=always po/build/locale/de/LC_MESSAGES/git.mo\n> \n> And turn it into a lang-de.c file, for which we'd make a lang-de.o that\n> we'd link in. And then either binary search through it, or just generate\n> code we'd compile (one really big switch/case statement).\n> \n> Now, if you count the number of messages we translate in *.sh land on\n> your digits you won't even need to use all of our toes, and for the\n> *.perl it's similar, especially with add--interactive.perl going away\n> any day now.\n> \n> There isn't any fundamental obstacle to making such a thing portable to\n> *.sh and *.perl, but having gotten that particular interop working once\n> in the past needing to do that again would bring this (I think\n> worthwhile) project from a \"maybe someday\" to \"nah\".\n\nJust to make it clear: I am totally neutral on your goal. It's on others\nto tell whether this is worth doing.\n\n>>> But I also don't think that such a series is probably not possible in\n>>> the near term if we're going to insist that all shellscript output must\n>>> byte-for-byte be the same (for boring reasons I won't go into, but it's\n>>> mainly to do with sh-i18n--envsubst.c).\n>>\n>> Such an insistence can easily be lifted if the change is justified\n>> sufficiently. I haven't seen such a justification, yet.\n> \n> Sure, but re the \"chicken & egg\" problem I might do all the work to do\n> all that, and someone such as yourself might rightly point out that it\n> would break someone's obscure use-case, scuttling the whole thing.\n> \n> Which isn't an exaggeration b.t.w., if you e.g. look through our\n> remaining gettext.sh usage you'll find that we carry the entirety of\n> sh-i18n--ensubst.c and everything around it (at least ~1k lines) for\n> emitting a single word in a single message in git-sh-setup.sh, that's\n> it.\n\nSee, someone thought it was a good idea to have i18n in shell scripts\nand others agreed that it was worth having ~1k lines of code to do that.\nSo the code went in. From then on, these ~1k lines are *not a problem*\nin themselves. From then on, the decision of having ~1k lines or not\nhaving them can only be based on what effect they have, but no longer on\n\"oh, wow, that's 1k lines to write a single word; do we really want that\"?\n\n> \n> Because the whole reason eval_gettext exists, and everything to support\n> it, is to support the use-case of feeding *arbitrary input* into the\n> translation engine, i.e. not the string you yourself have in your source\n> code & trust (it avoids shell \"eval\").\n> \n> But if you think that's of paramount importance (that word is \"usage\"\n> b.t.w., and the equivalent in usage.c isn't even translated) there\n> wouldn't be any way to make forward progress towards the next step of\n> making the remaining shellscript translations call some \"git sh--i18n\"\n> helper to get their output.\n> \n> So, to the extent that I was going to pursue the above plan at all I\n> wanted to do it in small steps, especially now as git-submodule.sh et al\n> are going away.\n> \n> So.\n> \n> It would be nice to get some leeway in some areas, especially for\n> something like this where I implemented this entire i18n system to begin\n> with, so I'd think it would be clear that it's not some drive-by\n> contribution. I clearly care about the end-goal, and have been sticking\n> with this particular topic for more than a decade.\n> \n> Not everything can always be a single atomically understood patch that\n> carries all possible reasons to make the change with it, some things are\n> more of a longer term incremental effort.\n> \n> And since we all have limited time on this spinning ball of mud\n> sometimes it can make sense to trickle in initial changes to see if some\n> larger end-goal is even attainable, or will be blocked due to some\n> unforeseen (or underestimated) reasons.\n\nYou can't have leeway for a change whose conclusion is \"removes some\nminiscule feature\". But if you add \"Here is the secret plan to Scrat's\ngolden nut; let's start with this change, even though it removes some\nminiscule feature\", things are vastly different.\n\n-- Hannes\n"},{"id":"452995","messageId":"220403.86fsmukvp5.gmgdl@evledraar.gmail.com","threadId":"56941","inReplyTo":"cc9aaba3-6904-4f96-db50-a368b9d9f0f2@kdbg.org","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-04-03T15:22:21Z","receivedAt":"2022-04-03T15:56:28Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Sat, Apr 02 2022, Johannes Sixt wrote:\n\n> Am 02.04.22 um 12:44 schrieb Ævar Arnfjörð Bjarmason:\n>> \n>> On Thu, Mar 31 2022, Johannes Sixt wrote:\n>> \n>>> Am 31.03.22 um 13:15 schrieb Ævar Arnfjörð Bjarmason:\n>>>> I do have some WIP changes to tear down most of the *.sh and *.perl i18n\n>>>> infrastructure (the parts still in use would still have translations),\n>>>> and IIRC it's at least a 2k line negative diffstat, and enables us to do\n>>>> more interesting things in i18n (e.g. getting rid of the libintl\n>>>> dependency).\n>>>\n>>> Why? Why? Why? Does the status quo have a problem somewhere? All this\n>>> sounds like a change for the sake of change.\n>> \n>> So this is quite the digression, but, hey, you asked for it.\n>\n> Oh, no, this is not a digression *at all*. What your write below is the\n> kind of text that is needed to judge the value of a change. Without it,\n> a change that does not have an otherwise obvious improvement[*] is just\n> for the change's sake.\n\nWell let's be clear here.\n\nIt's been your claim that the proposed change must not be worth doing\nbecause you don't place the same value on having a 1=1 mapping between\nstrings we ask translators to work on, and those that we'll actually\npresent as part of git's UI.\n\nWhich is fair enough, and something we can respectfully disagree on.\n\nBut that's not the same as claiming that the stated reason for the\nupthread patch is incomplete or insufficient.\n\nI can tell you that as the person who implemented this whole i18n\nfacility that providing translations for someone's random shellscript\nwas never the point, at all.\n\nIt just so happens that because we implemented some bits of\nfunctionality of the porcelain as shellscripts, and at the same time had\na shellscript library which (regrettably or not) seems to invite both\nin-tree and out-of-tree users to use it,that the two went hand-in-hand.\n\nBut now that they don't anymore I don't see anything \"handwaving\" about\nsimply removing the translation markings. I don't think they serve any\npurpose anymore.\n\n> [*] In my book, getting rid of a libintl dependency is not an obvious\n> improvement. I may be biased in this case, because that dependency was\n> never a problem for me. Might be because my personal builds all have\n> NO_GETTEXT set.\n\nSo not only don't you use a translated version of git, but you don't\neven compile one with it?\n\nYes, I can imagine that hasn't exposed you to any of the problems with\nit :)\n\n>>>> But I also don't think that such a series is probably not possible in\n>>>> the near term if we're going to insist that all shellscript output must\n>>>> byte-for-byte be the same (for boring reasons I won't go into, but it's\n>>>> mainly to do with sh-i18n--envsubst.c).\n>>>\n>>> Such an insistence can easily be lifted if the change is justified\n>>> sufficiently. I haven't seen such a justification, yet.\n>> \n>> Sure, but re the \"chicken & egg\" problem I might do all the work to do\n>> all that, and someone such as yourself might rightly point out that it\n>> would break someone's obscure use-case, scuttling the whole thing.\n>> \n>> Which isn't an exaggeration b.t.w., if you e.g. look through our\n>> remaining gettext.sh usage you'll find that we carry the entirety of\n>> sh-i18n--ensubst.c and everything around it (at least ~1k lines) for\n>> emitting a single word in a single message in git-sh-setup.sh, that's\n>> it.\n>\n> See, someone thought it was a good idea to have i18n in shell scripts\n> and others agreed that it was worth having ~1k lines of code to do that.\n> So the code went in. From then on, these ~1k lines are *not a problem*\n> in themselves. From then on, the decision of having ~1k lines or not\n> having them can only be based on what effect they have, but no longer on\n> \"oh, wow, that's 1k lines to write a single word; do we really want that\"?\n\nAside from i18n. I don't agree with that in general.\n\nYes, code that's in-tree and working needs to be under less scrutiny as\na new addition, and refactoring something isn't always worth it. We'll\nalso need to review the removals.\n\nBut there's also a cost to keeping things around, as you can e.g. see\nfrom various portability and correctness fixes to this code we've\nperma-forked from the GNU GPLv2 version.\n\nThere's some tipping point wherea refactoring isn't worth it, but\nemitting the word \"usage\" with ~1k lines is a pretty clear candidate in\nmy mind for a \"git rm\".\n\n>> Because the whole reason eval_gettext exists, and everything to support\n>> it, is to support the use-case of feeding *arbitrary input* into the\n>> translation engine, i.e. not the string you yourself have in your source\n>> code & trust (it avoids shell \"eval\").\n>> \n>> But if you think that's of paramount importance (that word is \"usage\"\n>> b.t.w., and the equivalent in usage.c isn't even translated) there\n>> wouldn't be any way to make forward progress towards the next step of\n>> making the remaining shellscript translations call some \"git sh--i18n\"\n>> helper to get their output.\n>> \n>> So, to the extent that I was going to pursue the above plan at all I\n>> wanted to do it in small steps, especially now as git-submodule.sh et al\n>> are going away.\n>> \n>> So.\n>> \n>> It would be nice to get some leeway in some areas, especially for\n>> something like this where I implemented this entire i18n system to begin\n>> with, so I'd think it would be clear that it's not some drive-by\n>> contribution. I clearly care about the end-goal, and have been sticking\n>> with this particular topic for more than a decade.\n>> \n>> Not everything can always be a single atomically understood patch that\n>> carries all possible reasons to make the change with it, some things are\n>> more of a longer term incremental effort.\n>> \n>> And since we all have limited time on this spinning ball of mud\n>> sometimes it can make sense to trickle in initial changes to see if some\n>> larger end-goal is even attainable, or will be blocked due to some\n>> unforeseen (or underestimated) reasons.\n>\n> You can't have leeway for a change whose conclusion is \"removes some\n> miniscule feature\". But if you add \"Here is the secret plan to Scrat's\n> golden nut; let's start with this change, even though it removes some\n> miniscule feature\", things are vastly different.\n\nI mean leeway on the topic that I probably have some idea of what I'm\ntalking about when it comes to git's i18n support, and whether it's\nworth the effort to keep certain things around or not.\n\nI.e. you started this thread by claiming that the removal of these\ntranslations would be \"castrating [out-of-tree] functionality, [which\nis] unacceptable.\".\n\nAs noted above I don't think that assessment is correct, and if I'm\nunderstanding you correctly you don't even use git's i18n mechanism at\nall.\n\nWhich I think presents only two possible conclusions.\n\nOne is that I, the person who added the i18n mechanism in the first\nplace, am so clueless about how it work or what it's for, that I'm\n(intentionally or not) submitting patches that \"castrate\" it.\n\nThe other is that you've understandably missed some of the nuance, such\nas why we're even marking strings for translation, and what the intended\naudience of them.\n\n"},{"id":"453053","messageId":"624935bb-0612-76e7-64f1-3614db0765a2@kdbg.org","threadId":"56941","inReplyTo":"220403.86fsmukvp5.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2022-04-04T20:20:46Z","receivedAt":"2022-04-04T21:23:47Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Please appologize that I do not reply to your arguments directly. I\nthink I have said all I can. Perhaps I am unable to express my concerns\nsufficiently clearly.\n\n-- Hannes\n"}]}