From: Eric Sunshine <sunshine@sunshineco.com>
To: git@vger.kernel.org
Cc: Josh Soref <jsoref@gmail.com>, Junio C Hamano <gitster@pobox.com>,
Elijah Newren <newren@gmail.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH v4 0/2] normalize & fix merge "up to date" messages
Date: Sun, 2 May 2021 01:14:21 -0400 [thread overview]
Message-ID: <20210502051423.48123-1-sunshine@sunshineco.com> (raw)
In-Reply-To: <pull.934.v3.git.1619052906768.gitgitgadget@gmail.com>
This is a re-roll of Josh Soref's v3[1] which fixes swapped components
of an "Already up to date" message emitted by builtin/merge. This
re-roll additionally normalizes punctuation of "Already up to date"
messages throughout the project.
I kept Josh as author of patch [2/2] but completely rewrote the commit
message to refocus it is a simple fix for a nearly 13 year old bug.
[1]: https://lore.kernel.org/git/pull.934.v3.git.1619052906768.gitgitgadget@gmail.com/
Eric Sunshine (1):
merge(s): apply consistent punctuation to "up to date" messages
Josh Soref (1):
merge: fix swapped "up to date" message components
builtin/merge.c | 14 +++++++++-----
merge-ort-wrappers.c | 2 +-
merge-recursive.c | 2 +-
notes-merge.c | 2 +-
4 files changed, 12 insertions(+), 8 deletions(-)
Range-diff against v3:
-: ---------- > 1: 3f96947e3a merge(s): apply consistent punctuation to "up to date" messages
1: 8cd2b8c335 ! 2: 5885b18b7f git-merge: rewrite already up to date message
@@ Metadata
Author: Josh Soref <jsoref@gmail.com>
## Commit message ##
- git-merge: rewrite already up to date message
+ merge: fix swapped "up to date" message components
- Usually, it is easier to read a message if it makes its primary
- point first, before giving a parenthetical note.
+ The rewrite of git-merge from shell to C in 1c7b76be7d (Build in merge,
+ 2008-07-07) accidentally transformed the message:
- Possible messages before include:
- ` (nothing to squash)Already up to date.
- `
- and
- `Already up to date. Yeeah!
- `
+ Already up-to-date. (nothing to squash)
- After:
- `Already up to date (nothing to squash).
- `
- and
- `Already up to date.
- `
+ to:
- Localizations now have two easy to understand translatable strings.
- (All localizations of the previous strings are broken.)
+ (nothing to squash)Already up-to-date.
+
+ due to reversed printf() arguments. This problem has gone unnoticed
+ despite being touched over the years by 7f87aff22c (Teach/Fix pull/fetch
+ -q/-v options, 2008-11-15) and bacec47845 (i18n: git-merge basic
+ messages, 2011-02-22), and tangentially by bef4830e88 (i18n: merge: mark
+ messages for translation, 2016-06-17) and 7560f547e6 (treewide: correct
+ several "up-to-date" to "up to date", 2017-08-23).
+
+ Fix it by restoring the message to its intended order. While at it, help
+ translators out by avoiding "sentence Lego".
+
+ [es: rewrote commit message]
Co-authored-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Josh Soref <jsoref@gmail.com>
+ Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
## builtin/merge.c ##
@@ builtin/merge.c: static void restore_state(const struct object_id *head,
@@ builtin/merge.c: static void restore_state(const struct object_id *head,
- printf("%s%s\n", squash ? _(" (nothing to squash)") : "", msg);
+ if (verbosity >= 0) {
+ if (squash)
-+ puts(_("Already up to date (nothing to squash)."));
++ puts(_("Already up to date. (nothing to squash)"));
+ else
+ puts(_("Already up to date."));
+ }
@@ builtin/merge.c: int cmd_merge(int argc, const char **argv, const char *prefix)
}
}
if (up_to_date) {
-- finish_up_to_date(_("Already up to date. Yeeah!"));
+- finish_up_to_date(_("Already up to date."));
+ finish_up_to_date();
goto done;
}
--
2.31.1.607.g51e8a6a459
next prev parent reply other threads:[~2021-05-02 5:16 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
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 ` Eric Sunshine [this message]
2021-05-02 5:14 ` [PATCH v4 1/2] merge(s): apply consistent punctuation to "up to date" messages 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210502051423.48123-1-sunshine@sunshineco.com \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jsoref@gmail.com \
--cc=newren@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).