{"thread":{"id":"55513","subject":"[PATCH] git-merge: move space to between strings","startedAt":"2021-04-18T18:33:30Z","lastAt":"2021-05-03T06:29:01Z","messageCount":19,"participants":["Josh Soref via GitGitGadget","Junio C Hamano","Eric Sunshine","Josh Soref"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"422216","messageId":"pull.934.git.1618770806366.gitgitgadget@gmail.com","threadId":"55513","inReplyTo":null,"subject":"[PATCH] git-merge: move space to between strings","fromName":"Josh Soref via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-04-18T18:33:25Z","receivedAt":"2021-04-18T18:33:30Z","isPatch":true,"sender":{"key":"jsoref@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2119212?v=4"},"body":"From: Josh Soref <jsoref@gmail.com>\n\nSigned-off-by: Josh Soref <jsoref@gmail.com>\n---\n    git-merge: move space to between strings\n    \n    GitHub Actions show things like:\n    \n     * branch                  master     -> FETCH_HEAD\n     (nothing to squash)Already up to date.\n    \n    \n    The expected results are:\n    \n     * branch                  master     -> FETCH_HEAD\n    (nothing to squash) Already up to date.\n    \n    \n    This commit should change that. Other than breaking all the\n    localizations, and anyone who actively parses the output, this shouldn't\n    have much impact.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-934%2Fjsoref%2Fnothing-to-squash-already-up-to-date-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-934/jsoref/nothing-to-squash-already-up-to-date-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/934\n\n builtin/merge.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 062e91144125..0d8c782cccb2 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -383,7 +383,7 @@ static void restore_state(const struct object_id *head,\n static void finish_up_to_date(const char *msg)\n {\n \tif (verbosity >= 0)\n-\t\tprintf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n+\t\tprintf(\"%s%s\\n\", squash ? _(\"(nothing to squash) \") : \"\", msg);\n \tremove_merge_branch_state(the_repository);\n }\n \n\nbase-commit: 7a6a90c6ec48fc78c83d7090d6c1b95d8f3739c0\n-- \ngitgitgadget\n"},{"id":"422218","messageId":"xmqqpmyr9zcd.fsf@gitster.g","threadId":"55513","inReplyTo":"pull.934.git.1618770806366.gitgitgadget@gmail.com","subject":"Re: [PATCH] git-merge: move space to between strings","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-04-18T19:17:38Z","receivedAt":"2021-04-18T19:18:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Josh Soref via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Josh Soref <jsoref@gmail.com>\n>\n> Signed-off-by: Josh Soref <jsoref@gmail.com>\n> ---\n>     git-merge: move space to between strings\n>     \n>     GitHub Actions show things like:\n>     \n>      * branch                  master     -> FETCH_HEAD\n>      (nothing to squash)Already up to date.\n>     \n>     \n>     The expected results are:\n>     \n>      * branch                  master     -> FETCH_HEAD\n>     (nothing to squash) Already up to date.\n\nI am not sure if that is THE expected results, though (you wouldn't\nhave got this reaction if you said \"I would expect to see\").  \n\nUsually, it is easier to read a message if it makes its primary\npoint first, before giving a parenthetical note.  I.e.  I would\nexpect that\n\n\tAlready up to date (nothing to squash).\n\nwould be easier to understand to users.\n\nThanks.\n"},{"id":"422640","messageId":"pull.934.v2.git.1619047347605.gitgitgadget@gmail.com","threadId":"55513","inReplyTo":"pull.934.git.1618770806366.gitgitgadget@gmail.com","subject":"[PATCH v2] git-merge: move primary point before parenthetical","fromName":"Josh Soref via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-04-21T23:22:26Z","receivedAt":"2021-04-21T23:22:34Z","isPatch":true,"sender":{"key":"jsoref@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2119212?v=4"},"body":"From: Josh Soref <jsoref@gmail.com>\n\nUsually, it is easier to read a message if it makes its primary\npoint first, before giving a parenthetical note.\n\nBefore:\n` (nothing to squash)Already up to date.\n`\n\nAfter:\n`Already up to date (nothing to squash).\n`\n\nSigned-off-by: Josh Soref <jsoref@gmail.com>\n---\n    git-merge: move space to between strings\n    \n    GitHub Actions show things like:\n    \n     * branch                  master     -> FETCH_HEAD\n     (nothing to squash)Already up to date.\n    \n    \n    Usually, it is easier to read a message if it makes its primary point\n    first, before giving a parenthetical note.\n    \n    The expected results are:\n    \n     * branch                  master     -> FETCH_HEAD\n    Already up to date (nothing to squash).\n    \n    \n    This commit should change that. Other than breaking all the\n    localizations, and anyone who actively parses the output, this shouldn't\n    have much impact.\n    \n    Changes since v1:\n    \n     * finish_up_to_date now takes a message with a %s for the parenthetical\n       and a trailing \\n to address feedback from Junio C Hamano\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-934%2Fjsoref%2Fnothing-to-squash-already-up-to-date-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-934/jsoref/nothing-to-squash-already-up-to-date-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/934\n\nRange-diff vs v1:\n\n 1:  1b9d685d611f ! 1:  4f60e08195ea git-merge: move space to between strings\n     @@ Metadata\n      Author: Josh Soref <jsoref@gmail.com>\n      \n       ## Commit message ##\n     -    git-merge: move space to between strings\n     +    git-merge: move primary point before parenthetical\n     +\n     +    Usually, it is easier to read a message if it makes its primary\n     +    point first, before giving a parenthetical note.\n     +\n     +    Before:\n     +    ` (nothing to squash)Already up to date.\n     +    `\n     +\n     +    After:\n     +    `Already up to date (nothing to squash).\n     +    `\n      \n          Signed-off-by: Josh Soref <jsoref@gmail.com>\n      \n     @@ builtin/merge.c: static void restore_state(const struct object_id *head,\n       {\n       \tif (verbosity >= 0)\n      -\t\tprintf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n     -+\t\tprintf(\"%s%s\\n\", squash ? _(\"(nothing to squash) \") : \"\", msg);\n     ++\t\tprintf(msg, squash ? _(\" (nothing to squash)\") : \"\");\n       \tremove_merge_branch_state(the_repository);\n       }\n       \n     +@@ builtin/merge.c: int cmd_merge(int argc, const char **argv, const char *prefix)\n     + \t\t * If head can reach all the merge then we are up to date.\n     + \t\t * but first the most common case of merging one remote.\n     + \t\t */\n     +-\t\tfinish_up_to_date(_(\"Already up to date.\"));\n     ++\t\tfinish_up_to_date(_(\"Already up to date%s.\\n\"));\n     + \t\tgoto done;\n     + \t} else if (fast_forward != FF_NO && !remoteheads->next &&\n     + \t\t\t!common->next &&\n     +@@ builtin/merge.c: int cmd_merge(int argc, const char **argv, const char *prefix)\n     + \t\t\t}\n     + \t\t}\n     + \t\tif (up_to_date) {\n     +-\t\t\tfinish_up_to_date(_(\"Already up to date. Yeeah!\"));\n     ++\t\t\tfinish_up_to_date(_(\"Already up to date%s. Yeeah!\\n\"));\n     + \t\t\tgoto done;\n     + \t\t}\n     + \t}\n\n\n builtin/merge.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 062e91144125..aad180010670 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -383,7 +383,7 @@ static void restore_state(const struct object_id *head,\n static void finish_up_to_date(const char *msg)\n {\n \tif (verbosity >= 0)\n-\t\tprintf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n+\t\tprintf(msg, squash ? _(\" (nothing to squash)\") : \"\");\n \tremove_merge_branch_state(the_repository);\n }\n \n@@ -1482,7 +1482,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t * If head can reach all the merge then we are up to date.\n \t\t * but first the most common case of merging one remote.\n \t\t */\n-\t\tfinish_up_to_date(_(\"Already up to date.\"));\n+\t\tfinish_up_to_date(_(\"Already up to date%s.\\n\"));\n \t\tgoto done;\n \t} else if (fast_forward != FF_NO && !remoteheads->next &&\n \t\t\t!common->next &&\n@@ -1566,7 +1566,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\t}\n \t\t}\n \t\tif (up_to_date) {\n-\t\t\tfinish_up_to_date(_(\"Already up to date. Yeeah!\"));\n+\t\t\tfinish_up_to_date(_(\"Already up to date%s. Yeeah!\\n\"));\n \t\t\tgoto done;\n \t\t}\n \t}\n\nbase-commit: 7a6a90c6ec48fc78c83d7090d6c1b95d8f3739c0\n-- \ngitgitgadget\n"},{"id":"422646","messageId":"CAPig+cT=xeLn9KNHz7hiNWo0QTfc1zZ1X-czJ4n503RRhBA0XQ@mail.gmail.com","threadId":"55513","inReplyTo":"pull.934.v2.git.1619047347605.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] git-merge: move primary point before parenthetical","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-04-21T23:46:14Z","receivedAt":"2021-04-21T23:46:29Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Apr 21, 2021 at 7:22 PM Josh Soref via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> Usually, it is easier to read a message if it makes its primary\n> point first, before giving a parenthetical note.\n>\n> Before:\n> ` (nothing to squash)Already up to date.\n> `\n>\n> After:\n> `Already up to date (nothing to squash).\n> `\n\nThanks. This makes perfect sense and fixes what clearly seems to be a\ncase of swapped arguments to printf(). While the intent of the patch\nis quite desirable, I do have some concerns about the actual\nchanges...\n\n> Signed-off-by: Josh Soref <jsoref@gmail.com>\n> ---\n> diff --git a/builtin/merge.c b/builtin/merge.c\n> @@ -383,7 +383,7 @@ static void restore_state(const struct object_id *head,\n>  static void finish_up_to_date(const char *msg)\n>  {\n>         if (verbosity >= 0)\n> -               printf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n> +               printf(msg, squash ? _(\" (nothing to squash)\") : \"\");\n>         remove_merge_branch_state(the_repository);\n>  }\n> @@ -1482,7 +1482,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n> -               finish_up_to_date(_(\"Already up to date.\"));\n> +               finish_up_to_date(_(\"Already up to date%s.\\n\"));\n> @@ -1566,7 +1566,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n> -                       finish_up_to_date(_(\"Already up to date. Yeeah!\"));\n> +                       finish_up_to_date(_(\"Already up to date%s. Yeeah!\\n\"));\n\nI see why you changed the calling convention, making it the\nresponsibility of the caller to supply the \"%s\" so that the \"(nothing\nto squash)\" annotation gets inserted before the period at the end of\n\"Already up to date\". However, this makes things confusing for people\ntranslating the text to other languages since they won't have enough\ncontext to understand what gets interpolated in place of \"%s\".\n\nIn fact (not a fault of your patch), this sort of \"sentence Lego\" was\nalready a bit difficult on translators because they couldn't see the\nentire context of \"Already up to date\" and \"(nothing to squash)\"\ntogether, thus could only translate them individually which may have\nled to inferior translations in some languages.\n\nIdeally, for the sake of translators, we want to give them as much\ncontext as possible, such as the entire \"Already up to date (nothing\nto squash)\". So, keeping translators and context in mind, and asking\nif we really need to that rather odd \"Yeeah!\", an alternative way to\nresolve this problem would be like this:\n\n    static void finish_up_to_date()\n    {\n        if (verbosity >= 0) {\n            if (squash)\n                puts(_(\"Already up to date (nothing to squash).\"));\n            else\n                puts(_(\"Already up to date.\"));\n        }\n        remove_merge_branch_state(the_repository);\n    }\n\nAnd then the callers reduce simply to:\n\n    finish_up_to_date();\n"},{"id":"422652","messageId":"pull.934.v3.git.1619052906768.gitgitgadget@gmail.com","threadId":"55513","inReplyTo":"pull.934.v2.git.1619047347605.gitgitgadget@gmail.com","subject":"[PATCH v3] git-merge: rewrite already up to date message","fromName":"Josh Soref via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-04-22T00:55:06Z","receivedAt":"2021-04-22T00:55:10Z","isPatch":true,"sender":{"key":"jsoref@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2119212?v=4"},"body":"From: Josh Soref <jsoref@gmail.com>\n\nUsually, it is easier to read a message if it makes its primary\npoint first, before giving a parenthetical note.\n\nPossible messages before include:\n` (nothing to squash)Already up to date.\n`\nand\n`Already up to date. Yeeah!\n`\n\nAfter:\n`Already up to date (nothing to squash).\n`\nand\n`Already up to date.\n`\n\nLocalizations now have two easy to understand translatable strings.\n(All localizations of the previous strings are broken.)\n\nCo-authored-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Josh Soref <jsoref@gmail.com>\n---\n    git-merge: rewrite already up to date message\n    \n    GitHub Actions show things like:\n    \n     * branch                  master     -> FETCH_HEAD\n     (nothing to squash)Already up to date.\n    \n    \n    There was a code path where it would say:\n    \n    Already up to date. Yeeah!\n    \n    \n    It is believed that other than being troublesome for localizers, this\n    message added no value, so it's being removed.\n    \n    Usually, it is easier to read a message if it makes its primary point\n    first, before giving a parenthetical note.\n    \n    The expected results are:\n    \n     * branch                  master     -> FETCH_HEAD\n    Already up to date (nothing to squash).\n    \n    \n    As well as an easier chance for localizers to actually translate the now\n    two messages. (As they don't have to fight string pasting. Which is a\n    localization sin.): Already up to date. Already up to date (nothing to\n    squash).\n    \n    This commit should change that. Other than breaking anyone who actively\n    parses the output and all the localizations (and giving localizers a\n    real chance at localizing these messages), this shouldn't have much\n    impact.\n    \n    Changes since v2:\n    \n     * finish_up_to_date now figures out the answer on its own to address\n       feedback from Eric Sunshine\n    \n    -- Yes, I'm well aware of localization rules. But as Eric Sunshine\n    noted, the code was already making a mess of things. I didn't want to\n    make invasive changes. I actually wrote roughly what Eric proposed as an\n    earlier implementation, but the various complexities, including trying\n    to figure out what the yeah was for and who cared about it, made me\n    really wary of proposing such a significant change.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-934%2Fjsoref%2Fnothing-to-squash-already-up-to-date-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-934/jsoref/nothing-to-squash-already-up-to-date-v3\nPull-Request: https://github.com/gitgitgadget/git/pull/934\n\nRange-diff vs v2:\n\n 1:  4f60e08195ea ! 1:  a6c703603cda git-merge: move primary point before parenthetical\n     @@ Metadata\n      Author: Josh Soref <jsoref@gmail.com>\n      \n       ## Commit message ##\n     -    git-merge: move primary point before parenthetical\n     +    git-merge: rewrite already up to date message\n      \n          Usually, it is easier to read a message if it makes its primary\n          point first, before giving a parenthetical note.\n      \n     -    Before:\n     +    Possible messages before include:\n          ` (nothing to squash)Already up to date.\n          `\n     +    and\n     +    `Already up to date. Yeeah!\n     +    `\n      \n          After:\n          `Already up to date (nothing to squash).\n          `\n     +    and\n     +    `Already up to date.\n     +    `\n     +\n     +    Localizations now have two easy to understand translatable strings.\n     +    (All localizations of the previous strings are broken.)\n      \n     +    Co-authored-by: Eric Sunshine <sunshine@sunshineco.com>\n          Signed-off-by: Josh Soref <jsoref@gmail.com>\n      \n       ## builtin/merge.c ##\n      @@ builtin/merge.c: static void restore_state(const struct object_id *head,\n     - static void finish_up_to_date(const char *msg)\n     + }\n     + \n     + /* This is called when no merge was necessary. */\n     +-static void finish_up_to_date(const char *msg)\n     ++static void finish_up_to_date(void)\n       {\n     - \tif (verbosity >= 0)\n     +-\tif (verbosity >= 0)\n      -\t\tprintf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n     -+\t\tprintf(msg, squash ? _(\" (nothing to squash)\") : \"\");\n     ++\tif (verbosity >= 0) {\n     ++\t\tif (squash)\n     ++\t\t\tputs(_(\"Already up to date (nothing to squash).\"));\n     ++\t\telse\n     ++\t\t\tputs(_(\"Already up to date.\"));\n     ++\t}\n       \tremove_merge_branch_state(the_repository);\n       }\n       \n     @@ builtin/merge.c: int cmd_merge(int argc, const char **argv, const char *prefix)\n       \t\t * but first the most common case of merging one remote.\n       \t\t */\n      -\t\tfinish_up_to_date(_(\"Already up to date.\"));\n     -+\t\tfinish_up_to_date(_(\"Already up to date%s.\\n\"));\n     ++\t\tfinish_up_to_date();\n       \t\tgoto done;\n       \t} else if (fast_forward != FF_NO && !remoteheads->next &&\n       \t\t\t!common->next &&\n     @@ builtin/merge.c: int cmd_merge(int argc, const char **argv, const char *prefix)\n       \t\t}\n       \t\tif (up_to_date) {\n      -\t\t\tfinish_up_to_date(_(\"Already up to date. Yeeah!\"));\n     -+\t\t\tfinish_up_to_date(_(\"Already up to date%s. Yeeah!\\n\"));\n     ++\t\t\tfinish_up_to_date();\n       \t\t\tgoto done;\n       \t\t}\n       \t}\n\n\n builtin/merge.c | 14 +++++++++-----\n 1 file changed, 9 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 062e91144125..f8c3d0687eaf 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -380,10 +380,14 @@ static void restore_state(const struct object_id *head,\n }\n \n /* This is called when no merge was necessary. */\n-static void finish_up_to_date(const char *msg)\n+static void finish_up_to_date(void)\n {\n-\tif (verbosity >= 0)\n-\t\tprintf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n+\tif (verbosity >= 0) {\n+\t\tif (squash)\n+\t\t\tputs(_(\"Already up to date (nothing to squash).\"));\n+\t\telse\n+\t\t\tputs(_(\"Already up to date.\"));\n+\t}\n \tremove_merge_branch_state(the_repository);\n }\n \n@@ -1482,7 +1486,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t * If head can reach all the merge then we are up to date.\n \t\t * but first the most common case of merging one remote.\n \t\t */\n-\t\tfinish_up_to_date(_(\"Already up to date.\"));\n+\t\tfinish_up_to_date();\n \t\tgoto done;\n \t} else if (fast_forward != FF_NO && !remoteheads->next &&\n \t\t\t!common->next &&\n@@ -1566,7 +1570,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\t}\n \t\t}\n \t\tif (up_to_date) {\n-\t\t\tfinish_up_to_date(_(\"Already up to date. Yeeah!\"));\n+\t\t\tfinish_up_to_date();\n \t\t\tgoto done;\n \t\t}\n \t}\n\nbase-commit: 7a6a90c6ec48fc78c83d7090d6c1b95d8f3739c0\n-- \ngitgitgadget\n"},{"id":"422659","messageId":"CAPig+cTZRM1d07Nd0WBtWm5AO1mfh9M8jvYAXcoPm9cJ1MpDnA@mail.gmail.com","threadId":"55513","inReplyTo":"pull.934.v3.git.1619052906768.gitgitgadget@gmail.com","subject":"Re: [PATCH v3] git-merge: rewrite already up to date message","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-04-22T03:41:15Z","receivedAt":"2021-04-22T03:41:45Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Apr 21, 2021 at 8:55 PM Josh Soref via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> Usually, it is easier to read a message if it makes its primary\n> point first, before giving a parenthetical note.\n> [...]\n> Signed-off-by: Josh Soref <jsoref@gmail.com>\n> ---\n>     Changes since v2:\n>\n>      * finish_up_to_date now figures out the answer on its own to address\n>        feedback from Eric Sunshine\n>\n>     -- Yes, I'm well aware of localization rules. But as Eric Sunshine\n>     noted, the code was already making a mess of things. I didn't want to\n>     make invasive changes. I actually wrote roughly what Eric proposed as an\n>     earlier implementation, but the various complexities, including trying\n>     to figure out what the yeah was for and who cared about it, made me\n>     really wary of proposing such a significant change.\n\nUnderstandable. I also was curious as to whether \"Yeeah!\" had any\nsignificance, thus checked the project history before responding to\nyour v2. As far as I can tell, \"Yeeah!\" has no particular\nsignificance. It materialized out of thin air with 1c7b76be7d (Build\nin merge, 2008-07-07) and simply hasn't been touched since then (in\nany meaningful way). Delving into the list archive doesn't shed any\nadditional light on \"Yeeah!\"; none of the reviews mentioned it at all.\nSo, it doesn't seem to serve any genuine purpose, and I don't mind\nseeing it go away, especially since its removal simplifies things for\ntranslators.\n\n> diff --git a/builtin/merge.c b/builtin/merge.c\n> @@ -380,10 +380,14 @@ static void restore_state(const struct object_id *head,\n>  /* This is called when no merge was necessary. */\n> -static void finish_up_to_date(const char *msg)\n> +static void finish_up_to_date(void)\n>  {\n> -       if (verbosity >= 0)\n> -               printf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n> +       if (verbosity >= 0) {\n> +               if (squash)\n> +                       puts(_(\"Already up to date (nothing to squash).\"));\n> +               else\n> +                       puts(_(\"Already up to date.\"));\n> +       }\n>         remove_merge_branch_state(the_repository);\n>  }\n> @@ -1482,7 +1486,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n> -               finish_up_to_date(_(\"Already up to date.\"));\n> +               finish_up_to_date();\n> @@ -1566,7 +1570,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n> -                       finish_up_to_date(_(\"Already up to date. Yeeah!\"));\n> +                       finish_up_to_date();\n\nPerhaps not surprisingly, I find this version of the patch much easier\nto understand.\n\nThanks for re-rolling.\n"},{"id":"423169","messageId":"xmqqbl9zcawf.fsf@gitster.g","threadId":"55513","inReplyTo":"pull.934.v3.git.1619052906768.gitgitgadget@gmail.com","subject":"Re: [PATCH v3] git-merge: rewrite already up to date message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-04-28T04:04:32Z","receivedAt":"2021-04-28T04:04:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Josh Soref via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Josh Soref <jsoref@gmail.com>\n>\n> Usually, it is easier to read a message if it makes its primary\n> point first, before giving a parenthetical note.\n>\n> Possible messages before include:\n> ` (nothing to squash)Already up to date.\n> `\n> and\n> `Already up to date. Yeeah!\n> `\n>\n> After:\n> `Already up to date (nothing to squash).\n> `\n> and\n> `Already up to date.\n> `\n>\n> Localizations now have two easy to understand translatable strings.\n> (All localizations of the previous strings are broken.)\n>\n> Co-authored-by: Eric Sunshine <sunshine@sunshineco.com>\n> Signed-off-by: Josh Soref <jsoref@gmail.com>\n> ---\n\nI am not sure why this is Co-au, and not the more usual \"Helped-by\".\n\nThe patch text makes sense to me.\n\nThanks.\n\n\n> diff --git a/builtin/merge.c b/builtin/merge.c\n> index 062e91144125..f8c3d0687eaf 100644\n> --- a/builtin/merge.c\n> +++ b/builtin/merge.c\n> @@ -380,10 +380,14 @@ static void restore_state(const struct object_id *head,\n>  }\n>  \n>  /* This is called when no merge was necessary. */\n> -static void finish_up_to_date(const char *msg)\n> +static void finish_up_to_date(void)\n>  {\n> -\tif (verbosity >= 0)\n> -\t\tprintf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n> +\tif (verbosity >= 0) {\n> +\t\tif (squash)\n> +\t\t\tputs(_(\"Already up to date (nothing to squash).\"));\n> +\t\telse\n> +\t\t\tputs(_(\"Already up to date.\"));\n> +\t}\n>  \tremove_merge_branch_state(the_repository);\n>  }\n>  \n> @@ -1482,7 +1486,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n>  \t\t * If head can reach all the merge then we are up to date.\n>  \t\t * but first the most common case of merging one remote.\n>  \t\t */\n> -\t\tfinish_up_to_date(_(\"Already up to date.\"));\n> +\t\tfinish_up_to_date();\n>  \t\tgoto done;\n>  \t} else if (fast_forward != FF_NO && !remoteheads->next &&\n>  \t\t\t!common->next &&\n> @@ -1566,7 +1570,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n>  \t\t\t}\n>  \t\t}\n>  \t\tif (up_to_date) {\n> -\t\t\tfinish_up_to_date(_(\"Already up to date. Yeeah!\"));\n> +\t\t\tfinish_up_to_date();\n>  \t\t\tgoto done;\n>  \t\t}\n>  \t}\n>\n> base-commit: 7a6a90c6ec48fc78c83d7090d6c1b95d8f3739c0\n"},{"id":"423249","messageId":"xmqqk0ol7cka.fsf@gitster.g","threadId":"55513","inReplyTo":"xmqqbl9zcawf.fsf@gitster.g","subject":"Re: [PATCH v3] git-merge: rewrite already up to date message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-04-29T07:52:05Z","receivedAt":"2021-04-29T07:52:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> \"Josh Soref via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n>> From: Josh Soref <jsoref@gmail.com>\n>>\n>> Usually, it is easier to read a message if it makes its primary\n>> point first, before giving a parenthetical note.\n>>\n>> Possible messages before include:\n>> ` (nothing to squash)Already up to date.\n>> `\n>> and\n>> `Already up to date. Yeeah!\n>> `\n>>\n>> After:\n>> `Already up to date (nothing to squash).\n>> `\n>> and\n>> `Already up to date.\n>> `\n>>\n>> Localizations now have two easy to understand translatable strings.\n>> (All localizations of the previous strings are broken.)\n>>\n>> Co-authored-by: Eric Sunshine <sunshine@sunshineco.com>\n>> Signed-off-by: Josh Soref <jsoref@gmail.com>\n>> ---\n>\n> I am not sure why this is Co-au, and not the more usual \"Helped-by\".\n>\n> The patch text makes sense to me.\n\nActually, not so fast.  The end-users do not care really where the\nmessage originates.\n\n$ git grep -e 'Already up[- ]to' \\*.c\nmaint:builtin/merge.c:\t\tfinish_up_to_date(_(\"Already up to date.\"));\nmaint:builtin/merge.c:\t\t\tfinish_up_to_date(_(\"Already up to date. Yeeah!\"));\nmaint:merge-ort-wrappers.c:\t\tprintf(_(\"Already up to date!\"));\nmaint:merge-recursive.c:\t\toutput(opt, 0, _(\"Already up to date!\"));\nmaint:notes-merge.c:\t\t\tprintf(\"Already up to date!\\n\");\n\nIt probably makes sense to replace the exclamation point with a full\nstop for others, no?\n\n\nAlso, I didn't notice when reading the patch submission earlier, but\nwhat does\n\n>> (All localizations of the previous strings are broken.)\n\nmean, exactly?  Do you mean to say\n\n    Because this changes some messages, the old messages that were\n    already translated will no longer be used, and these new\n    messages need to be translated anew.\n\nor\n\n    Because of (...some unstated reason...), the entries in the\n    message database in po/ that were meant to translate the old\n    messages this patch updates were not correctly used.\n\nor something else?\n\n\n\n\n"},{"id":"423426","messageId":"CACZqfqCXrhUtsC3TLYaw6u7D0VohsBcz10aVxpe-1u8gg77qxQ@mail.gmail.com","threadId":"55513","inReplyTo":"xmqqk0ol7cka.fsf@gitster.g","subject":"Re: [PATCH v3] git-merge: rewrite already up to date message","fromName":"Josh Soref","fromEmail":"jsoref@gmail.com","sentAt":"2021-05-02T01:51:29Z","receivedAt":"2021-05-02T01:51:42Z","isPatch":true,"sender":{"key":"jsoref@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2119212?v=4"},"body":"\"Josh Soref via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n> From: Josh Soref <jsoref@gmail.com>\n> Co-authored-by: Eric Sunshine <sunshine@sunshineco.com>\n> Signed-off-by: Josh Soref <jsoref@gmail.com>\n\nJunio C Hamano <gitster@pobox.com> writes:\n> I am not sure why this is Co-au, and not the more usual \"Helped-by\".\n\nIf you look at the thread, you'll see that the code in question was\nwritten by Eric [1]. The only change from it was the addition of\n`void` to the function prototype by me.\n\nThat said, it's my first foray into patches for git. I didn't use\nhelped-by because gitgitgadget didn't tell me to [2].\n\nI have no opinion on the details. At this point, it's likely that a\nsecond commit would include a helped-by referencing you. Maybe. I'm\nnot sure of the semantics of helped-by [2].\n\nJunio C Hamano <gitster@pobox.com> wrote:\n> Actually, not so fast.  The end-users do not care really where the\n> message originates.\n>\n> $ git grep -e 'Already up[- ]to' \\*.c\n> maint:builtin/merge.c:          finish_up_to_date(_(\"Already up to date.\"));\n> maint:builtin/merge.c:                  finish_up_to_date(_(\"Already up to date. Yeeah!\"));\n> maint:merge-ort-wrappers.c:             printf(_(\"Already up to date!\"));\n> maint:merge-recursive.c:                output(opt, 0, _(\"Already up to date!\"));\n> maint:notes-merge.c:                    printf(\"Already up to date!\\n\");\n>\n> It probably makes sense to replace the exclamation point with a full\n> stop for others, no?\n\nMaybe. I'm not sure what they mean.\n\nI'm fully capable of wearing a grammar / UX hat and rewriting the\nentire UX for a project if you invite me to do so.\n\nI generally try not to do that when I initially approach a project, I\nprefer to get more comfortable w/ it and let it get more comfortable\nw/ me before I make significant change proposals.\n\n(As an aside, I did start looking into what these messages meant /\nwhat to change them to, but other things have come up, and I've\ndecided that I should at least respond to this message instead of just\nappearing to disappear.)\n\n> Also, I didn't notice when reading the patch submission earlier, but\n> what does\n>\n> >> (All localizations of the previous strings are broken.)\n>\n> mean, exactly?  Do you mean to say\n>\n>     Because this changes some messages, the old messages that were\n>     already translated will no longer be used, and these new\n>     messages need to be translated anew.\n\nYes, this is what I meant. It's probably technically obvious to some\npeople, but since I'm invited to describe the effects of my change, it\nseemed worth noting. Anyone cutting a release with this commit but not\nupdating the translations would be bleeding en-US into the\ntranslations where before they would have had translated content.\n(Whether that translated content was any good given the fact that it\nwas pasted together is a different story, but...)\n\n[1] https://lore.kernel.org/git/CAPig+cT=xeLn9KNHz7hiNWo0QTfc1zZ1X-czJ4n503RRhBA0XQ@mail.gmail.com/\n[2] https://github.com/gitgitgadget/gitgitgadget/issues/543\n"},{"id":"423427","messageId":"CAPig+cR0Z=sUPHW8kuMG0sOv4bb309MV=WTR1nMGOoYB+1yfVg@mail.gmail.com","threadId":"55513","inReplyTo":"CACZqfqCXrhUtsC3TLYaw6u7D0VohsBcz10aVxpe-1u8gg77qxQ@mail.gmail.com","subject":"Re: [PATCH v3] git-merge: rewrite already up to date message","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-05-02T02:15:18Z","receivedAt":"2021-05-02T02:15:31Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sat, May 1, 2021 at 9:51 PM Josh Soref <jsoref@gmail.com> wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n> > I am not sure why this is Co-au, and not the more usual \"Helped-by\".\n>\n> If you look at the thread, you'll see that the code in question was\n> written by Eric [1]. The only change from it was the addition of\n> `void` to the function prototype by me.\n\nOops, I suppose I've been doing too much Go and C++ lately and am\nforgetting `void`.\n\nI don't have a strong opinion between Co-authored-by: and Helped-by:\nin this case. Here's my sign-off if you want to retain Co-authored-by:\n\n    Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n\n> Junio C Hamano <gitster@pobox.com> wrote:\n> > Actually, not so fast.  The end-users do not care really where the\n> > message originates.\n> >\n> > $ git grep -e 'Already up[- ]to' \\*.c\n> > maint:builtin/merge.c:          finish_up_to_date(_(\"Already up to date.\"));\n> > maint:builtin/merge.c:                  finish_up_to_date(_(\"Already up to date. Yeeah!\"));\n> > maint:merge-ort-wrappers.c:             printf(_(\"Already up to date!\"));\n> > maint:merge-recursive.c:                output(opt, 0, _(\"Already up to date!\"));\n> > maint:notes-merge.c:                    printf(\"Already up to date!\\n\");\n> >\n> > It probably makes sense to replace the exclamation point with a full\n> > stop for others, no?\n>\n> Maybe. I'm not sure what they mean.\n>\n> I generally try not to do that when I initially approach a project, I\n> prefer to get more comfortable w/ it and let it get more comfortable\n> w/ me before I make significant change proposals.\n\nIndeed. While it might be nice to settle upon a single punctuation\nstyle for these messages, I don't see this as a requirement of the\npatch in question. It could, of course, be re-rolled as a two-patch\nseries in which the second patch addresses the exclamation points, but\nfixing the punctuation could also be done later as a follow-up patch\nby someone (it doesn't need to be you). So, I don't see a good reason\nto hold up the current patch which stands nicely on its own.\n"},{"id":"423428","messageId":"xmqqv981c0zw.fsf@gitster.g","threadId":"55513","inReplyTo":"CAPig+cR0Z=sUPHW8kuMG0sOv4bb309MV=WTR1nMGOoYB+1yfVg@mail.gmail.com","subject":"Re: [PATCH v3] git-merge: rewrite already up to date message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-05-02T02:39:47Z","receivedAt":"2021-05-02T02:39:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> Indeed. While it might be nice to settle upon a single punctuation\n> style for these messages, I don't see this as a requirement of the\n> patch in question. It could, of course, be re-rolled as a two-patch\n> series in which the second patch addresses the exclamation points, but\n> fixing the punctuation could also be done later as a follow-up patch\n> by someone (it doesn't need to be you). So, I don't see a good reason\n> to hold up the current patch which stands nicely on its own.\n\nI would agree in general, especially for a patch that fixes some\nbehaviour that hurts people *and* does a clean-up while at it, that\nit is OK that the secondary \"clean-up\" part does not do as through\njob as it should.\n\nBut isn't the premise of this particular patch \"these 'already\nup-to-date' messages puzzle readers by being sligntly different,\nwhen the differences are not meant to convey anything, so let's\nunify them and make them more coherent to help readers and\ntranslators\", is it?  I think that was why \"Yeeah!\" was removed, for\nexample.  Now we were made aware of the presence of \"Already up to\ndate\" vs \"Already up to date!\" by the \"grep\" tool.  Leaving half the\ngrep hits unaddressed makes the patch look like stopping halfway the\ntask it started to do.\n\nSo, in this particular case, I do not agree with any of the\n\"two-patch\" or \"follow-up\" or \"somebody else can do so\".\n\nThanks.\n"},{"id":"423429","messageId":"20210502051423.48123-3-sunshine@sunshineco.com","threadId":"55513","inReplyTo":"20210502051423.48123-1-sunshine@sunshineco.com","subject":"[PATCH v4 2/2] merge: fix swapped \"up to date\" message components","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-05-02T05:14:23Z","receivedAt":"2021-05-02T05:15:37Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"From: Josh Soref <jsoref@gmail.com>\n\nThe rewrite of git-merge from shell to C in 1c7b76be7d (Build in merge,\n2008-07-07) accidentally transformed the message:\n\n    Already up-to-date. (nothing to squash)\n\nto:\n\n    (nothing to squash)Already up-to-date.\n\ndue to reversed printf() arguments. This problem has gone unnoticed\ndespite being touched over the years by 7f87aff22c (Teach/Fix pull/fetch\n-q/-v options, 2008-11-15) and bacec47845 (i18n: git-merge basic\nmessages, 2011-02-22), and tangentially by bef4830e88 (i18n: merge: mark\nmessages for translation, 2016-06-17) and 7560f547e6 (treewide: correct\nseveral \"up-to-date\" to \"up to date\", 2017-08-23).\n\nFix it by restoring the message to its intended order. While at it, help\ntranslators out by avoiding \"sentence Lego\".\n\n[es: rewrote commit message]\n\nCo-authored-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Josh Soref <jsoref@gmail.com>\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n builtin/merge.c | 14 +++++++++-----\n 1 file changed, 9 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 3472a0ce3b..eddb8ae70d 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -393,10 +393,14 @@ static void restore_state(const struct object_id *head,\n }\n \n /* This is called when no merge was necessary. */\n-static void finish_up_to_date(const char *msg)\n+static void finish_up_to_date(void)\n {\n-\tif (verbosity >= 0)\n-\t\tprintf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n+\tif (verbosity >= 0) {\n+\t\tif (squash)\n+\t\t\tputs(_(\"Already up to date. (nothing to squash)\"));\n+\t\telse\n+\t\t\tputs(_(\"Already up to date.\"));\n+\t}\n \tremove_merge_branch_state(the_repository);\n }\n \n@@ -1522,7 +1526,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t * If head can reach all the merge then we are up to date.\n \t\t * but first the most common case of merging one remote.\n \t\t */\n-\t\tfinish_up_to_date(_(\"Already up to date.\"));\n+\t\tfinish_up_to_date();\n \t\tgoto done;\n \t} else if (fast_forward != FF_NO && !remoteheads->next &&\n \t\t\t!common->next &&\n@@ -1610,7 +1614,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\t}\n \t\t}\n \t\tif (up_to_date) {\n-\t\t\tfinish_up_to_date(_(\"Already up to date.\"));\n+\t\t\tfinish_up_to_date();\n \t\t\tgoto done;\n \t\t}\n \t}\n-- \n2.31.1.607.g51e8a6a459\n\n"},{"id":"423430","messageId":"20210502051423.48123-1-sunshine@sunshineco.com","threadId":"55513","inReplyTo":"pull.934.v3.git.1619052906768.gitgitgadget@gmail.com","subject":"[PATCH v4 0/2] normalize & fix merge \"up to date\" messages","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-05-02T05:14:21Z","receivedAt":"2021-05-02T05:15:37Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"This is a re-roll of Josh Soref's v3[1] which fixes swapped components\nof an \"Already up to date\" message emitted by builtin/merge. This\nre-roll additionally normalizes punctuation of \"Already up to date\"\nmessages throughout the project.\n\nI kept Josh as author of patch [2/2] but completely rewrote the commit\nmessage to refocus it is a simple fix for a nearly 13 year old bug.\n\n[1]: https://lore.kernel.org/git/pull.934.v3.git.1619052906768.gitgitgadget@gmail.com/\n\nEric Sunshine (1):\n  merge(s): apply consistent punctuation to \"up to date\" messages\n\nJosh Soref (1):\n  merge: fix swapped \"up to date\" message components\n\n builtin/merge.c      | 14 +++++++++-----\n merge-ort-wrappers.c |  2 +-\n merge-recursive.c    |  2 +-\n notes-merge.c        |  2 +-\n 4 files changed, 12 insertions(+), 8 deletions(-)\n\nRange-diff against v3:\n-:  ---------- > 1:  3f96947e3a merge(s): apply consistent punctuation to \"up to date\" messages\n1:  8cd2b8c335 ! 2:  5885b18b7f git-merge: rewrite already up to date message\n    @@ Metadata\n     Author: Josh Soref <jsoref@gmail.com>\n     \n      ## Commit message ##\n    -    git-merge: rewrite already up to date message\n    +    merge: fix swapped \"up to date\" message components\n     \n    -    Usually, it is easier to read a message if it makes its primary\n    -    point first, before giving a parenthetical note.\n    +    The rewrite of git-merge from shell to C in 1c7b76be7d (Build in merge,\n    +    2008-07-07) accidentally transformed the message:\n     \n    -    Possible messages before include:\n    -    ` (nothing to squash)Already up to date.\n    -    `\n    -    and\n    -    `Already up to date. Yeeah!\n    -    `\n    +        Already up-to-date. (nothing to squash)\n     \n    -    After:\n    -    `Already up to date (nothing to squash).\n    -    `\n    -    and\n    -    `Already up to date.\n    -    `\n    +    to:\n     \n    -    Localizations now have two easy to understand translatable strings.\n    -    (All localizations of the previous strings are broken.)\n    +        (nothing to squash)Already up-to-date.\n    +\n    +    due to reversed printf() arguments. This problem has gone unnoticed\n    +    despite being touched over the years by 7f87aff22c (Teach/Fix pull/fetch\n    +    -q/-v options, 2008-11-15) and bacec47845 (i18n: git-merge basic\n    +    messages, 2011-02-22), and tangentially by bef4830e88 (i18n: merge: mark\n    +    messages for translation, 2016-06-17) and 7560f547e6 (treewide: correct\n    +    several \"up-to-date\" to \"up to date\", 2017-08-23).\n    +\n    +    Fix it by restoring the message to its intended order. While at it, help\n    +    translators out by avoiding \"sentence Lego\".\n    +\n    +    [es: rewrote commit message]\n     \n         Co-authored-by: Eric Sunshine <sunshine@sunshineco.com>\n         Signed-off-by: Josh Soref <jsoref@gmail.com>\n    +    Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n     \n      ## builtin/merge.c ##\n     @@ builtin/merge.c: static void restore_state(const struct object_id *head,\n    @@ builtin/merge.c: static void restore_state(const struct object_id *head,\n     -\t\tprintf(\"%s%s\\n\", squash ? _(\" (nothing to squash)\") : \"\", msg);\n     +\tif (verbosity >= 0) {\n     +\t\tif (squash)\n    -+\t\t\tputs(_(\"Already up to date (nothing to squash).\"));\n    ++\t\t\tputs(_(\"Already up to date. (nothing to squash)\"));\n     +\t\telse\n     +\t\t\tputs(_(\"Already up to date.\"));\n     +\t}\n    @@ builtin/merge.c: int cmd_merge(int argc, const char **argv, const char *prefix)\n      \t\t\t}\n      \t\t}\n      \t\tif (up_to_date) {\n    --\t\t\tfinish_up_to_date(_(\"Already up to date. Yeeah!\"));\n    +-\t\t\tfinish_up_to_date(_(\"Already up to date.\"));\n     +\t\t\tfinish_up_to_date();\n      \t\t\tgoto done;\n      \t\t}\n-- \n2.31.1.607.g51e8a6a459\n\n"},{"id":"423431","messageId":"20210502051423.48123-2-sunshine@sunshineco.com","threadId":"55513","inReplyTo":"20210502051423.48123-1-sunshine@sunshineco.com","subject":"[PATCH v4 1/2] merge(s): apply consistent punctuation to \"up to date\" messages","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-05-02T05:14:22Z","receivedAt":"2021-05-02T05:15:37Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Although the various \"Already up to date\" messages resulting from merge\nattempts share identical phrasing, they use a mix of punctuation ranging\nfrom \".\" to \"!\" and even \"Yeeah!\", which leads to extra work for\ntranslators. Ease the job of translators by settling upon \".\" as\npunctuation for all such messages.\n\nWhile at it, take advantage of printf_ln() to further ease the\ntranslation task so translators need not worry about line termination,\nand fix a case of missing line termination in the (unused)\nmerge_ort_nonrecursive() function.\n\nSuggested-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n builtin/merge.c      | 2 +-\n merge-ort-wrappers.c | 2 +-\n merge-recursive.c    | 2 +-\n notes-merge.c        | 2 +-\n 4 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 388619536a..3472a0ce3b 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -1610,7 +1610,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t\t}\n \t\t}\n \t\tif (up_to_date) {\n-\t\t\tfinish_up_to_date(_(\"Already up to date. Yeeah!\"));\n+\t\t\tfinish_up_to_date(_(\"Already up to date.\"));\n \t\t\tgoto done;\n \t\t}\n \t}\ndiff --git a/merge-ort-wrappers.c b/merge-ort-wrappers.c\nindex 7eec25f93a..ad04106169 100644\n--- a/merge-ort-wrappers.c\n+++ b/merge-ort-wrappers.c\n@@ -30,7 +30,7 @@ int merge_ort_nonrecursive(struct merge_options *opt,\n \t\treturn -1;\n \n \tif (oideq(&merge_base->object.oid, &merge->object.oid)) {\n-\t\tprintf(_(\"Already up to date!\"));\n+\t\tprintf_ln(_(\"Already up to date.\"));\n \t\treturn 1;\n \t}\n \ndiff --git a/merge-recursive.c b/merge-recursive.c\nindex 27b222ae49..8ca5e3142d 100644\n--- a/merge-recursive.c\n+++ b/merge-recursive.c\n@@ -3462,7 +3462,7 @@ static int merge_trees_internal(struct merge_options *opt,\n \t}\n \n \tif (oideq(&merge_base->object.oid, &merge->object.oid)) {\n-\t\toutput(opt, 0, _(\"Already up to date!\"));\n+\t\toutput(opt, 0, _(\"Already up to date.\"));\n \t\t*result = head;\n \t\treturn 1;\n \t}\ndiff --git a/notes-merge.c b/notes-merge.c\nindex d2771fa3d4..321155fc87 100644\n--- a/notes-merge.c\n+++ b/notes-merge.c\n@@ -628,7 +628,7 @@ int notes_merge(struct notes_merge_options *o,\n \tif (oideq(&remote->object.oid, base_oid)) {\n \t\t/* Already merged; result == local commit */\n \t\tif (o->verbosity >= 2)\n-\t\t\tprintf(\"Already up to date!\\n\");\n+\t\t\tprintf_ln(\"Already up to date.\");\n \t\toidcpy(result_oid, &local->object.oid);\n \t\tgoto found_result;\n \t}\n-- \n2.31.1.607.g51e8a6a459\n\n"},{"id":"423436","messageId":"xmqqr1ipbqif.fsf@gitster.g","threadId":"55513","inReplyTo":"CAPig+cR0Z=sUPHW8kuMG0sOv4bb309MV=WTR1nMGOoYB+1yfVg@mail.gmail.com","subject":"Re: [PATCH v3] git-merge: rewrite already up to date message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-05-02T06:26:16Z","receivedAt":"2021-05-02T06:26:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Sat, May 1, 2021 at 9:51 PM Josh Soref <jsoref@gmail.com> wrote:\n>> Junio C Hamano <gitster@pobox.com> writes:\n>> > I am not sure why this is Co-au, and not the more usual \"Helped-by\".\n>>\n>> If you look at the thread, you'll see that the code in question was\n>> written by Eric [1]. The only change from it was the addition of\n>> `void` to the function prototype by me.\n>\n> Oops, I suppose I've been doing too much Go and C++ lately and am\n> forgetting `void`.\n>\n> I don't have a strong opinion between Co-authored-by: and Helped-by:\n> in this case. Here's my sign-off if you want to retain Co-authored-by:\n>\n>     Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n\nI am not in principle opposed to the idea of co-authored-by; for\nthis particular one, we historically have used Helped-by (i.e. a\nreviewer offers \"writing it this way is cleaner\" suggestions on the\nlist and then gets credited on the next version), and it wasn't\nclear to me if you consented to be a co-author of the patch.  If the\nparty who were named as a co-author responded that it is OK, I would\nbe perfectly fine.\n\n"},{"id":"423441","messageId":"CAPig+cRm9yE9vpcms4rpPwJxd-C0MQ8n17tiyW8ufXwG=1UaTg@mail.gmail.com","threadId":"55513","inReplyTo":"xmqqr1ipbqif.fsf@gitster.g","subject":"Re: [PATCH v3] git-merge: rewrite already up to date message","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-05-02T07:14:32Z","receivedAt":"2021-05-02T07:14:47Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, May 2, 2021 at 2:26 AM Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> > I don't have a strong opinion between Co-authored-by: and Helped-by:\n> > in this case. Here's my sign-off if you want to retain Co-authored-by:\n> >\n> >     Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>\n>\n> I am not in principle opposed to the idea of co-authored-by; for\n> this particular one, we historically have used Helped-by (i.e. a\n> reviewer offers \"writing it this way is cleaner\" suggestions on the\n> list and then gets credited on the next version), and it wasn't\n> clear to me if you consented to be a co-author of the patch.  If the\n> party who were named as a co-author responded that it is OK, I would\n> be perfectly fine.\n\nIt wasn't my intention to be co-author but I'm OK with the designation\nin this particular case since I did end up authoring all the code in\nthe patch (aside from `void`), even if that authorship was by accident\nthrough the circumstance of reviewing the patch (but, as mentioned\nabove, I can go either way with it).\n"},{"id":"423463","messageId":"xmqqwnsg8kaf.fsf@gitster.g","threadId":"55513","inReplyTo":"20210502051423.48123-3-sunshine@sunshineco.com","subject":"Re: [PATCH v4 2/2] merge: fix swapped \"up to date\" message components","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-05-03T05:21:12Z","receivedAt":"2021-05-03T05:21:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> +\tif (verbosity >= 0) {\n> +\t\tif (squash)\n> +\t\t\tputs(_(\"Already up to date. (nothing to squash)\"));\n\nThe original scripted Porcelain may have said so, but the placement\nof full-stop in the above feels a bit strange.  Should we rephrase\nit to\n\n\tAlready up to date (nothing to squash).\n\nas we are fixing the phrasing now?\n"},{"id":"423469","messageId":"CAPig+cTf6bTpqpi2b27N2jDd_cS26VC6M6GcTRB_FSAn3m5CsQ@mail.gmail.com","threadId":"55513","inReplyTo":"xmqqwnsg8kaf.fsf@gitster.g","subject":"Re: [PATCH v4 2/2] merge: fix swapped \"up to date\" message components","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-05-03T05:50:37Z","receivedAt":"2021-05-03T05:50:51Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, May 3, 2021 at 1:21 AM Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> > +     if (verbosity >= 0) {\n> > +             if (squash)\n> > +                     puts(_(\"Already up to date. (nothing to squash)\"));\n>\n> The original scripted Porcelain may have said so, but the placement\n> of full-stop in the above feels a bit strange.  Should we rephrase\n> it to\n>\n>         Already up to date (nothing to squash).\n>\n> as we are fixing the phrasing now?\n\nI don't have a strong opinion about it, and can go either way with it.\nJosh's patch did place the full-stop after the closing parenthesis. I\ncan re-roll if people think that would be preferable (unless you want\nto change it locally while queuing).\n"},{"id":"423470","messageId":"xmqq7dkg8h5j.fsf@gitster.g","threadId":"55513","inReplyTo":"CAPig+cTf6bTpqpi2b27N2jDd_cS26VC6M6GcTRB_FSAn3m5CsQ@mail.gmail.com","subject":"Re: [PATCH v4 2/2] merge: fix swapped \"up to date\" message components","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-05-03T06:28:56Z","receivedAt":"2021-05-03T06:29:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Mon, May 3, 2021 at 1:21 AM Junio C Hamano <gitster@pobox.com> wrote:\n>> Eric Sunshine <sunshine@sunshineco.com> writes:\n>> > +     if (verbosity >= 0) {\n>> > +             if (squash)\n>> > +                     puts(_(\"Already up to date. (nothing to squash)\"));\n>>\n>> The original scripted Porcelain may have said so, but the placement\n>> of full-stop in the above feels a bit strange.  Should we rephrase\n>> it to\n>>\n>>         Already up to date (nothing to squash).\n>>\n>> as we are fixing the phrasing now?\n>\n> I don't have a strong opinion about it, and can go either way with it.\n> Josh's patch did place the full-stop after the closing parenthesis. I\n> can re-roll if people think that would be preferable (unless you want\n> to change it locally while queuing).\n\nI am fine to leave this outisde the topic.\n"}]}