{"thread":{"id":"60935","subject":"[Improvements on messages 0/5] Disambuiguate between options and commands","startedAt":"2024-02-16T10:16:58Z","lastAt":"2024-03-05T22:05:45Z","messageCount":9,"participants":["Alexander Shopov","Junio C Hamano","Alex Henrie"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"488788","messageId":"20240216101647.28837-1-ash@kambanaria.org","threadId":"60935","inReplyTo":null,"subject":"[Improvements on messages 0/5] Disambuiguate between options and commands","fromName":"Alexander Shopov","fromEmail":"ash@kambanaria.org","sentAt":"2024-02-16T10:15:32Z","receivedAt":"2024-02-16T10:16:58Z","isPatch":false,"sender":{"key":"ash@kambanaria.org","avatar":"https://avatars.githubusercontent.com/u/449359?v=4"},"body":"\nThese are trivial fixes to messages.\nThey make sure commands and options are markes as such.\nThis will help translators and end users.\nThis will also reduce the special cases Jiang Xin keeps\nfor git-po-helper which will ease maintenance.\n\nI am basing these on maint but I have also checked that\nthey ar still relevant by cherry picking on top of latest and next.\n\nEach patch contains a single message fix. Each patch is sent to\n - This list\n - Jiang Xin\n - Junio C Hamano\n - The developer who last edited the line I am changing\n\nThese are nice to be merged but this is not urgent.\n\nAlexander Shopov (5):\n  rebase: trivial fix of error message\n  transport-helper.c: trivial fix of error message\n  builtin/remote.c: trivial fix of error message\n  builtin/clone.c: trivial fix of message\n  revision.c: trivial fix to message\n\n builtin/clone.c    | 2 +-\n builtin/rebase.c   | 2 +-\n builtin/remote.c   | 2 +-\n revision.c         | 2 +-\n transport-helper.c | 2 +-\n 5 files changed, 5 insertions(+), 5 deletions(-)\n\n--\n2.43.2\n"},{"id":"488789","messageId":"20240216101647.28837-2-ash@kambanaria.org","threadId":"60935","inReplyTo":"20240216101647.28837-1-ash@kambanaria.org","subject":"[Improvements on messages 1/5] rebase: trivial fix of error message","fromName":"Alexander Shopov","fromEmail":"ash@kambanaria.org","sentAt":"2024-02-16T10:15:33Z","receivedAt":"2024-02-16T10:16:59Z","isPatch":false,"sender":{"key":"ash@kambanaria.org","avatar":"https://avatars.githubusercontent.com/u/449359?v=4"},"body":"Mark --rebase-merges as option rather than variable name\n\nSigned-off-by: Alexander Shopov <ash@kambanaria.org>\n---\n builtin/rebase.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/rebase.c b/builtin/rebase.c\nindex 4084a6abb8..9c6d971515 100644\n--- a/builtin/rebase.c\n+++ b/builtin/rebase.c\n@@ -746,7 +746,7 @@ static void parse_rebase_merges_value(struct rebase_options *options, const char\n \telse if (!strcmp(\"rebase-cousins\", value))\n \t\toptions->rebase_cousins = 1;\n \telse\n-\t\tdie(_(\"Unknown rebase-merges mode: %s\"), value);\n+\t\tdie(_(\"Unknown --rebase-merges mode: %s\"), value);\n }\n\n static int rebase_config(const char *var, const char *value,\n--\n2.43.2\n"},{"id":"488790","messageId":"20240216101647.28837-3-ash@kambanaria.org","threadId":"60935","inReplyTo":"20240216101647.28837-1-ash@kambanaria.org","subject":"[Improvements on messages 2/5] transport-helper.c: trivial fix of error message","fromName":"Alexander Shopov","fromEmail":"ash@kambanaria.org","sentAt":"2024-02-16T10:15:34Z","receivedAt":"2024-02-16T10:17:00Z","isPatch":false,"sender":{"key":"ash@kambanaria.org","avatar":"https://avatars.githubusercontent.com/u/449359?v=4"},"body":"Mark --force as option rather than variable names\n\nSigned-off-by: Alexander Shopov <ash@kambanaria.org>\n---\n transport-helper.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/transport-helper.c b/transport-helper.c\nindex e34a8f47cf..7014b9ad70 100644\n--- a/transport-helper.c\n+++ b/transport-helper.c\n@@ -1072,7 +1072,7 @@ static int push_refs_with_export(struct transport *transport,\n \tset_common_push_options(transport, data->name, flags);\n \tif (flags & TRANSPORT_PUSH_FORCE) {\n \t\tif (set_helper_option(transport, \"force\", \"true\") != 0)\n-\t\t\twarning(_(\"helper %s does not support 'force'\"), data->name);\n+\t\t\twarning(_(\"helper %s does not support '--force'\"), data->name);\n \t}\n\n \thelper = get_helper(transport);\n--\n2.43.2\n"},{"id":"488791","messageId":"20240216101647.28837-4-ash@kambanaria.org","threadId":"60935","inReplyTo":"20240216101647.28837-1-ash@kambanaria.org","subject":"[Improvements on messages 3/5] builtin/remote.c: trivial fix of error message","fromName":"Alexander Shopov","fromEmail":"ash@kambanaria.org","sentAt":"2024-02-16T10:15:35Z","receivedAt":"2024-02-16T10:17:02Z","isPatch":false,"sender":{"key":"ash@kambanaria.org","avatar":"https://avatars.githubusercontent.com/u/449359?v=4"},"body":"Mark --mirror as option rather than command\n\nSigned-off-by: Alexander Shopov <ash@kambanaria.org>\n---\n builtin/remote.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/remote.c b/builtin/remote.c\nindex d91bbe728d..8412d12fa5 100644\n--- a/builtin/remote.c\n+++ b/builtin/remote.c\n@@ -150,7 +150,7 @@ static int parse_mirror_opt(const struct option *opt, const char *arg, int not)\n \telse if (!strcmp(arg, \"push\"))\n \t\t*mirror = MIRROR_PUSH;\n \telse\n-\t\treturn error(_(\"unknown mirror argument: %s\"), arg);\n+\t\treturn error(_(\"unknown --mirror argument: %s\"), arg);\n \treturn 0;\n }\n\n--\n2.43.2\n"},{"id":"488792","messageId":"20240216101647.28837-5-ash@kambanaria.org","threadId":"60935","inReplyTo":"20240216101647.28837-1-ash@kambanaria.org","subject":"[Improvements on messages 4/5] builtin/clone.c: trivial fix of message","fromName":"Alexander Shopov","fromEmail":"ash@kambanaria.org","sentAt":"2024-02-16T10:15:36Z","receivedAt":"2024-02-16T10:17:03Z","isPatch":false,"sender":{"key":"ash@kambanaria.org","avatar":"https://avatars.githubusercontent.com/u/449359?v=4"},"body":"bare in that context is an option, not purely an adjective\nMark it properly\n\nSigned-off-by: Alexander Shopov <ash@kambanaria.org>\n---\n builtin/clone.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex 315befa133..f0261bbb01 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -115,7 +115,7 @@ static struct option builtin_clone_options[] = {\n \tOPT_HIDDEN_BOOL(0, \"naked\", &option_bare,\n \t\t\tN_(\"create a bare repository\")),\n \tOPT_BOOL(0, \"mirror\", &option_mirror,\n-\t\t N_(\"create a mirror repository (implies bare)\")),\n+\t\t N_(\"create a mirror repository (implies --bare)\")),\n \tOPT_BOOL('l', \"local\", &option_local,\n \t\tN_(\"to clone from a local repository\")),\n \tOPT_BOOL(0, \"no-hardlinks\", &option_no_hardlinks,\n--\n2.43.2\n"},{"id":"488793","messageId":"20240216101647.28837-6-ash@kambanaria.org","threadId":"60935","inReplyTo":"20240216101647.28837-1-ash@kambanaria.org","subject":"[Improvements on messages 5/5] revision.c: trivial fix to message","fromName":"Alexander Shopov","fromEmail":"ash@kambanaria.org","sentAt":"2024-02-16T10:15:37Z","receivedAt":"2024-02-16T10:17:05Z","isPatch":false,"sender":{"key":"ash@kambanaria.org","avatar":"https://avatars.githubusercontent.com/u/449359?v=4"},"body":"ancestry-path is an option, not a command - mark it as such.\nThis brings it in sync with the rest of usages in the file\n\nSigned-off-by: Alexander Shopov <ash@kambanaria.org>\n---\n revision.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/revision.c b/revision.c\nindex 2424c9bd67..e29aa10781 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -2320,7 +2320,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg\n \t} else if (skip_prefix(arg, \"--ancestry-path=\", &optarg)) {\n \t\tstruct commit *c;\n \t\tstruct object_id oid;\n-\t\tconst char *msg = _(\"could not get commit for ancestry-path argument %s\");\n+\t\tconst char *msg = _(\"could not get commit for --ancestry-path argument %s\");\n\n \t\trevs->ancestry_path = 1;\n \t\trevs->simplify_history = 0;\n--\n2.43.2\n"},{"id":"488803","messageId":"xmqqa5o0i71o.fsf@gitster.g","threadId":"60935","inReplyTo":"20240216101647.28837-1-ash@kambanaria.org","subject":"Re: [Improvements on messages 0/5] Disambuiguate between options and commands","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-16T18:43:31Z","receivedAt":"2024-02-16T18:43:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexander Shopov <ash@kambanaria.org> writes:\n\n> These are trivial fixes to messages.\n> They make sure commands and options are markes as such.\n> This will help translators and end users.\n> This will also reduce the special cases Jiang Xin keeps\n> for git-po-helper which will ease maintenance.\n>\n> I am basing these on maint but I have also checked that\n> they ar still relevant by cherry picking on top of latest and next.\n\nI've looked at all of them and they looked sensible.\n\nThe changes look like this:\n\n\t-\tdie(_(\"something option something: %s\"), arg);\n\t+\tdie(_(\"something --option something: %s\"), arg);\n\nIt is not a fault of this patch, but wasn't the concensus that the\nideal form would be more like this:\n\n\t\tdie(_(\"something %s something: %s\"), \"--option\", arg);\n\nin order to completely avoid tempting translators into touching\n\"--option\", IIRC?\n\nThese patches do not make things worse, so I am willing to say they\nare strict improvements and the series is a good first step if we\nwanted to follow through to eject option names out of translatable\nstrings later.\n\nThanks.\n"},{"id":"488805","messageId":"CAMMLpeS-Q7drd0rHnpMEkuomUGOr0iJi3FGFWihA=oFbdZ=Duw@mail.gmail.com","threadId":"60935","inReplyTo":"20240216101647.28837-2-ash@kambanaria.org","subject":"Re: [Improvements on messages 1/5] rebase: trivial fix of error message","fromName":"Alex Henrie","fromEmail":"alexhenrie24@gmail.com","sentAt":"2024-02-16T19:05:16Z","receivedAt":"2024-02-16T19:05:53Z","isPatch":false,"sender":{"key":"alexhenrie24@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5951993?v=4"},"body":"On Fri, Feb 16, 2024 at 3:16 AM Alexander Shopov <ash@kambanaria.org> wrote:\n>\n> Mark --rebase-merges as option rather than variable name\n>\n> Signed-off-by: Alexander Shopov <ash@kambanaria.org>\n> ---\n>  builtin/rebase.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/builtin/rebase.c b/builtin/rebase.c\n> index 4084a6abb8..9c6d971515 100644\n> --- a/builtin/rebase.c\n> +++ b/builtin/rebase.c\n> @@ -746,7 +746,7 @@ static void parse_rebase_merges_value(struct rebase_options *options, const char\n>         else if (!strcmp(\"rebase-cousins\", value))\n>                 options->rebase_cousins = 1;\n>         else\n> -               die(_(\"Unknown rebase-merges mode: %s\"), value);\n> +               die(_(\"Unknown --rebase-merges mode: %s\"), value);\n\nHi Alexander! The other patches in this series look good to me, but I\ndon't think this one is right. This error message could be about\neither the --rebase-merges command line option or the\nrebase.rebaseMerges config option. The word \"rebase-merges\" is\nintentionally ambiguous enough to cover both situations and was not\nintended to be left in English in translations.\n\n-Alex\n"},{"id":"490023","messageId":"xmqq8r2wz64p.fsf@gitster.g","threadId":"60935","inReplyTo":"20240216101647.28837-1-ash@kambanaria.org","subject":"Re: [Improvements on messages 0/5] Disambuiguate between options and commands","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-03-05T22:05:42Z","receivedAt":"2024-03-05T22:05:45Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexander Shopov <ash@kambanaria.org> writes:\n\n> These are nice to be merged but this is not urgent.\n>\n> Alexander Shopov (5):\n>   rebase: trivial fix of error message\n>   transport-helper.c: trivial fix of error message\n>   builtin/remote.c: trivial fix of error message\n>   builtin/clone.c: trivial fix of message\n>   revision.c: trivial fix to message\n\nThe first one got commented on with a suggestion to drop it; any\ncomments on other patches, anybody?\n\nIf not, I'll drop the first patch and merge the remainder down to\n'next'.\n\nThanks.\n"}]}