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

[PATCH v2 03/11] Prefer 'up-to-date' spelling

From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 5, 2019, 17:07 UTC
Message-ID
<466aead9af6516ff94a5d217e58ab894e63088b7.1572973651.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.418.v2.git.1572973650.gitgitgadget@gmail.com>
From: Elijah Newren <newren@gmail.com>

When we are providing an English error message for users, we should avoid 'uptodate'. According to https://writingexplained.org/up-to-date-hyphenated, when used as an adjective (i.e. when used as a synonym for 'current') -- which matches our usage -- the correct spelling is up-to-date. (Alternatively, when used as an adverb, the same page points out it is spelled 'up to date'.) In either case, when providing an English error message for users, we shouldn't use 'uptodate'. Correct the spelling.

Reported-by: Jens Schleusener <Jens.Schleusener@fossies.org>
Signed-off-by: Elijah Newren <newren@gmail.com>
---
 builtin/fetch.c                | 2 +-
 gitk-git/gitk                  | 2 +-
 t/t7110-reset-merge.sh         | 4 ++--
 t/t7609-merge-co-error-msgs.sh | 2 +-
 unpack-trees.c                 | 6 +++---
 5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 863c858fde..d597fa5be0 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -604,7 +604,7 @@ static void adjust_refcol_width(const struct ref *ref)
 {
 	int max, rlen, llen, len;
 
-	/* uptodate lines are only shown on high verbosity level */
+	/* up-to-date lines are only shown on high verbosity level */
 	if (!verbosity && oideq(&ref->peer_ref->old_oid, &ref->old_oid))
 		return;
 
diff --git a/gitk-git/gitk b/gitk-git/gitk
index abe4805ade..50a5b60c13 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -9696,7 +9696,7 @@ proc cherrypick {} {
     if {[catch {exec sh -c "git cherry-pick -r $rowmenuid 2>&1"} err]} {
 	notbusy cherrypick
 	if {[regexp -line \
-		 {Entry '(.*)' (would be overwritten by merge|not uptodate)} \
+		 {Entry '(.*)' (would be overwritten by merge|not up-to-date)} \
 		 $err msg fname]} {
 	    error_popup [mc "Cherry-pick failed because of local changes\
 			to file '%s'.\nPlease commit, reset or stash\
diff --git a/t/t7110-reset-merge.sh b/t/t7110-reset-merge.sh
index a82a07a04a..d81a27f3b0 100755
--- a/t/t7110-reset-merge.sh
+++ b/t/t7110-reset-merge.sh
@@ -173,7 +173,7 @@ test_expect_success 'reset --merge fails with changes in file it touches' '
     sed -e "s/line 1/changed line 1/" <file1 >file3 &&
     mv file3 file1 &&
     test_must_fail git reset --merge HEAD^ 2>err.log &&
-    grep file1 err.log | grep "not uptodate"
+    grep file1 err.log | grep "not up-to-date"
 '
 
 # The next test will test the following:
@@ -189,7 +189,7 @@ test_expect_success 'reset --keep fails with changes in file it touches' '
     sed -e "s/line 1/changed line 1/" <file1 >file3 &&
     mv file3 file1 &&
     test_must_fail git reset --keep HEAD^ 2>err.log &&
-    grep file1 err.log | grep "not uptodate"
+    grep file1 err.log | grep "not up-to-date"
 '
 
 test_expect_success 'setup 3 different branches' '
diff --git a/t/t7609-merge-co-error-msgs.sh b/t/t7609-merge-co-error-msgs.sh
index e90413204e..111253ae5d 100755
--- a/t/t7609-merge-co-error-msgs.sh
+++ b/t/t7609-merge-co-error-msgs.sh
@@ -98,7 +98,7 @@ Please commit your changes or stash them before you switch branches.
 Aborting
 EOF
 
-test_expect_success 'not uptodate file porcelain checkout error' '
+test_expect_success 'not up-to-date file porcelain checkout error' '
 	git add rep/one rep/two &&
 	test_must_fail git checkout branch 2>out &&
 	test_i18ncmp out expect
diff --git a/unpack-trees.c b/unpack-trees.c
index 33ea7810d8..8ba2dc3267 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -29,7 +29,7 @@ static const char *unpack_plumbing_errors[NB_UNPACK_TREES_ERROR_TYPES] = {
 	"Entry '%s' would be overwritten by merge. Cannot merge.",
 
 	/* ERROR_NOT_UPTODATE_FILE */
-	"Entry '%s' not uptodate. Cannot merge.",
+	"Entry '%s' not up-to-date. Cannot merge.",
 
 	/* ERROR_NOT_UPTODATE_DIR */
 	"Updating '%s' would lose untracked files in it",
@@ -44,7 +44,7 @@ static const char *unpack_plumbing_errors[NB_UNPACK_TREES_ERROR_TYPES] = {
 	"Entry '%s' overlaps with '%s'.  Cannot bind.",
 
 	/* ERROR_SPARSE_NOT_UPTODATE_FILE */
-	"Entry '%s' not uptodate. Cannot update sparse checkout.",
+	"Entry '%s' not up-to-date. Cannot update sparse checkout.",
 
 	/* ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN */
 	"Working tree file '%s' would be overwritten by sparse checkout update.",
@@ -2027,7 +2027,7 @@ static int merged_entry(const struct cache_entry *ce,
 	} else if (!(old->ce_flags & CE_CONFLICTED)) {
 		/*
 		 * See if we can re-use the old CE directly?
-		 * That way we get the uptodate stat info.
+		 * That way we get the up-to-date stat info.
 		 *
 		 * This also removes the UPDATE flag on a match; otherwise
 		 * we will end up overwriting local changes in the work tree.
-- 
gitgitgadget
Previous: Elijah Newren via GitGitGadgetNext: Junio C Hamano
Message 5 of 17 in “Thyme two ficks sum Documentaton tyops and speling erors!”
  1. 0/1 Thyme two ficks sum Documentaton tyops and speling erors!Elijah Newren via GitGitGadget, Oct 23, 2019
  2. 1/1 Documentation: fix a bunch of typos, both old and newElijah Newren via GitGitGadget, Oct 23, 2019
  3. 00/11 Thyme two ficks sum Documentaton tyops and speling erors!Elijah Newren via GitGitGadget, Nov 5, 2019
  4. 02/11 Fix spelling errors in documentation outside of Documentation/Elijah Newren via GitGitGadget, Nov 5, 2019
  5. 03/11 Prefer 'up-to-date' spellingElijah Newren via GitGitGadget, Nov 5, 2019
  6. Junio C HamanoNov 7, 2019
  7. Junio C HamanoNov 7, 2019
  8. Elijah NewrenNov 7, 2019
  9. 05/11 Fix spelling errors in comments of testcasesElijah Newren via GitGitGadget, Nov 5, 2019
  10. 04/11 Fix spelling errors in code commentsElijah Newren via GitGitGadget, Nov 5, 2019
  11. 06/11 Fix spelling errors in names of testsElijah Newren via GitGitGadget, Nov 5, 2019
  12. 07/11 Fix spelling errors in messages shown to usersElijah Newren via GitGitGadget, Nov 5, 2019
  13. 09/11 sha1dc: fix trivial comment spelling errorElijah Newren via GitGitGadget, Nov 5, 2019
  14. 08/11 Fix spelling errors in test commandsElijah Newren via GitGitGadget, Nov 5, 2019
  15. 11/11 Fix spelling errors in no-longer-updated-from-upstream modulesElijah Newren via GitGitGadget, Nov 5, 2019
  16. 10/11 multimail: fix a few simple spelling errorsElijah Newren via GitGitGadget, Nov 5, 2019
  17. 01/11 Documentation: fix a bunch of typos, both old and newElijah Newren via GitGitGadget, Nov 5, 2019

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.