git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v4 1/2] merge(s): apply consistent punctuation to "up to date" messages

From
Eric Sunshine <sunshine@sunshineco.com>
Date
May 2, 2021, 05:14 UTC
Message-ID
<20210502051423.48123-2-sunshine@sunshineco.com>
In-Reply-To
<20210502051423.48123-1-sunshine@sunshineco.com>

Although the various "Already up to date" messages resulting from merge attempts share identical phrasing, they use a mix of punctuation ranging from "." to "!" and even "Yeeah!", which leads to extra work for translators. Ease the job of translators by settling upon "." as punctuation for all such messages.

While at it, take advantage of printf_ln() to further ease the translation task so translators need not worry about line termination, and fix a case of missing line termination in the (unused) merge_ort_nonrecursive() function.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 builtin/merge.c      | 2 +-
 merge-ort-wrappers.c | 2 +-
 merge-recursive.c    | 2 +-
 notes-merge.c        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index 388619536a..3472a0ce3b 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1610,7 +1610,7 @@ 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."));
 			goto done;
 		}
 	}
diff --git a/merge-ort-wrappers.c b/merge-ort-wrappers.c
index 7eec25f93a..ad04106169 100644
--- a/merge-ort-wrappers.c
+++ b/merge-ort-wrappers.c
@@ -30,7 +30,7 @@ int merge_ort_nonrecursive(struct merge_options *opt,
 		return -1;
 
 	if (oideq(&merge_base->object.oid, &merge->object.oid)) {
-		printf(_("Already up to date!"));
+		printf_ln(_("Already up to date."));
 		return 1;
 	}
 
diff --git a/merge-recursive.c b/merge-recursive.c
index 27b222ae49..8ca5e3142d 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -3462,7 +3462,7 @@ static int merge_trees_internal(struct merge_options *opt,
 	}
 
 	if (oideq(&merge_base->object.oid, &merge->object.oid)) {
-		output(opt, 0, _("Already up to date!"));
+		output(opt, 0, _("Already up to date."));
 		*result = head;
 		return 1;
 	}
diff --git a/notes-merge.c b/notes-merge.c
index d2771fa3d4..321155fc87 100644
--- a/notes-merge.c
+++ b/notes-merge.c
@@ -628,7 +628,7 @@ int notes_merge(struct notes_merge_options *o,
 	if (oideq(&remote->object.oid, base_oid)) {
 		/* Already merged; result == local commit */
 		if (o->verbosity >= 2)
-			printf("Already up to date!\n");
+			printf_ln("Already up to date.");
 		oidcpy(result_oid, &local->object.oid);
 		goto found_result;
 	}
-- 
2.31.1.607.g51e8a6a459
Previous: Junio C Hamano
Message 19 of 19 in “git-merge: move space to between strings”
  1. git-merge: move space to between stringsJosh Soref via GitGitGadget, Apr 18, 2021
  2. Junio C HamanoApr 18, 2021
  3. git-merge: move primary point before parentheticalJosh Soref via GitGitGadget, Apr 21, 2021
  4. Eric SunshineApr 21, 2021
  5. git-merge: rewrite already up to date messageJosh Soref via GitGitGadget, Apr 22, 2021
  6. Eric SunshineApr 22, 2021
  7. Junio C HamanoApr 28, 2021
  8. Junio C HamanoApr 29, 2021
  9. Josh SorefMay 2, 2021
  10. Eric SunshineMay 2, 2021
  11. Junio C HamanoMay 2, 2021
  12. Junio C HamanoMay 2, 2021
  13. Eric SunshineMay 2, 2021
  14. 0/2 normalize & fix merge "up to date" messagesEric Sunshine, May 2, 2021
  15. 2/2 merge: fix swapped "up to date" message componentsEric Sunshine, May 2, 2021
  16. Junio C HamanoMay 3, 2021
  17. Eric SunshineMay 3, 2021
  18. Junio C HamanoMay 3, 2021
  19. 1/2 merge(s): apply consistent punctuation to "up to date" messagesEric Sunshine, May 2, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.