Message ID | 20210502051423.48123-3-sunshine@sunshineco.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3] git-merge: rewrite already up to date message | expand |
Eric Sunshine <sunshine@sunshineco.com> writes: > + if (verbosity >= 0) { > + if (squash) > + puts(_("Already up to date. (nothing to squash)")); The original scripted Porcelain may have said so, but the placement of full-stop in the above feels a bit strange. Should we rephrase it to Already up to date (nothing to squash). as we are fixing the phrasing now?
On Mon, May 3, 2021 at 1:21 AM Junio C Hamano <gitster@pobox.com> wrote: > Eric Sunshine <sunshine@sunshineco.com> writes: > > + if (verbosity >= 0) { > > + if (squash) > > + puts(_("Already up to date. (nothing to squash)")); > > The original scripted Porcelain may have said so, but the placement > of full-stop in the above feels a bit strange. Should we rephrase > it to > > Already up to date (nothing to squash). > > as we are fixing the phrasing now? I don't have a strong opinion about it, and can go either way with it. Josh's patch did place the full-stop after the closing parenthesis. I can re-roll if people think that would be preferable (unless you want to change it locally while queuing).
Eric Sunshine <sunshine@sunshineco.com> writes: > On Mon, May 3, 2021 at 1:21 AM Junio C Hamano <gitster@pobox.com> wrote: >> Eric Sunshine <sunshine@sunshineco.com> writes: >> > + if (verbosity >= 0) { >> > + if (squash) >> > + puts(_("Already up to date. (nothing to squash)")); >> >> The original scripted Porcelain may have said so, but the placement >> of full-stop in the above feels a bit strange. Should we rephrase >> it to >> >> Already up to date (nothing to squash). >> >> as we are fixing the phrasing now? > > I don't have a strong opinion about it, and can go either way with it. > Josh's patch did place the full-stop after the closing parenthesis. I > can re-roll if people think that would be preferable (unless you want > to change it locally while queuing). I am fine to leave this outisde the topic.
diff --git a/builtin/merge.c b/builtin/merge.c index 3472a0ce3b..eddb8ae70d 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -393,10 +393,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); } @@ -1522,7 +1526,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix) * If head can reach all the merge then we are up to date. * but first the most common case of merging one remote. */ - finish_up_to_date(_("Already up to date.")); + finish_up_to_date(); goto done; } else if (fast_forward != FF_NO && !remoteheads->next && !common->next && @@ -1610,7 +1614,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix) } } if (up_to_date) { - finish_up_to_date(_("Already up to date.")); + finish_up_to_date(); goto done; } }