All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Josh Soref via GitGitGadget <gitgitgadget@gmail.com>
Cc: Git List <git@vger.kernel.org>, Josh Soref <jsoref@gmail.com>
Subject: Re: [PATCH v3] git-merge: rewrite already up to date message
Date: Wed, 21 Apr 2021 23:41:15 -0400	[thread overview]
Message-ID: <CAPig+cTZRM1d07Nd0WBtWm5AO1mfh9M8jvYAXcoPm9cJ1MpDnA@mail.gmail.com> (raw)
In-Reply-To: <pull.934.v3.git.1619052906768.gitgitgadget@gmail.com>

On Wed, Apr 21, 2021 at 8:55 PM Josh Soref via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> Usually, it is easier to read a message if it makes its primary
> point first, before giving a parenthetical note.
> [...]
> Signed-off-by: Josh Soref <jsoref@gmail.com>
> ---
>     Changes since v2:
>
>      * finish_up_to_date now figures out the answer on its own to address
>        feedback from Eric Sunshine
>
>     -- Yes, I'm well aware of localization rules. But as Eric Sunshine
>     noted, the code was already making a mess of things. I didn't want to
>     make invasive changes. I actually wrote roughly what Eric proposed as an
>     earlier implementation, but the various complexities, including trying
>     to figure out what the yeah was for and who cared about it, made me
>     really wary of proposing such a significant change.

Understandable. I also was curious as to whether "Yeeah!" had any
significance, thus checked the project history before responding to
your v2. As far as I can tell, "Yeeah!" has no particular
significance. It materialized out of thin air with 1c7b76be7d (Build
in merge, 2008-07-07) and simply hasn't been touched since then (in
any meaningful way). Delving into the list archive doesn't shed any
additional light on "Yeeah!"; none of the reviews mentioned it at all.
So, it doesn't seem to serve any genuine purpose, and I don't mind
seeing it go away, especially since its removal simplifies things for
translators.

> diff --git a/builtin/merge.c b/builtin/merge.c
> @@ -380,10 +380,14 @@ static void restore_state(const struct object_id *head,
>  /* This is called when no merge was necessary. */
> -static void finish_up_to_date(const char *msg)
> +static void finish_up_to_date(void)
>  {
> -       if (verbosity >= 0)
> -               printf("%s%s\n", squash ? _(" (nothing to squash)") : "", msg);
> +       if (verbosity >= 0) {
> +               if (squash)
> +                       puts(_("Already up to date (nothing to squash)."));
> +               else
> +                       puts(_("Already up to date."));
> +       }
>         remove_merge_branch_state(the_repository);
>  }
> @@ -1482,7 +1486,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
> -               finish_up_to_date(_("Already up to date."));
> +               finish_up_to_date();
> @@ -1566,7 +1570,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
> -                       finish_up_to_date(_("Already up to date. Yeeah!"));
> +                       finish_up_to_date();

Perhaps not surprisingly, I find this version of the patch much easier
to understand.

Thanks for re-rolling.

  reply	other threads:[~2021-04-22  3:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18 18:33 [PATCH] git-merge: move space to between strings Josh Soref via GitGitGadget
2021-04-18 19:17 ` Junio C Hamano
2021-04-21 23:22 ` [PATCH v2] git-merge: move primary point before parenthetical Josh Soref via GitGitGadget
2021-04-21 23:46   ` Eric Sunshine
2021-04-22  0:55   ` [PATCH v3] git-merge: rewrite already up to date message Josh Soref via GitGitGadget
2021-04-22  3:41     ` Eric Sunshine [this message]
2021-04-28  4:04     ` Junio C Hamano
2021-04-29  7:52       ` Junio C Hamano
2021-05-02  1:51         ` Josh Soref
2021-05-02  2:15           ` Eric Sunshine
2021-05-02  2:39             ` Junio C Hamano
2021-05-02  6:26             ` Junio C Hamano
2021-05-02  7:14               ` Eric Sunshine
2021-05-02  5:14     ` [PATCH v4 0/2] normalize & fix merge "up to date" messages Eric Sunshine
2021-05-02  5:14       ` [PATCH v4 1/2] merge(s): apply consistent punctuation to " Eric Sunshine
2021-05-02  5:14       ` [PATCH v4 2/2] merge: fix swapped "up to date" message components Eric Sunshine
2021-05-03  5:21         ` Junio C Hamano
2021-05-03  5:50           ` Eric Sunshine
2021-05-03  6:28             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPig+cTZRM1d07Nd0WBtWm5AO1mfh9M8jvYAXcoPm9cJ1MpDnA@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=jsoref@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.