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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Elijah Newren <newren@xxxxxxxxx>

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@xxxxxxxxxxx>
Signed-off-by: Elijah Newren <newren@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux