messages confusing

7 messages, 4 authors, 2016-06-15 · open the first message on its own page

messages confusing

From: Nicolas Sebrecht <hidden>
Date: 2016-06-15 22:49:05

Hi all,

I had those messages today

  % git merge origin/master
    Already uptodate!
    Merge made by recursive.
  %

with git version 1.7.2.rc1.210.g7b476 and I wonder if it is really
intended.  It did create an empty merge commit but I find both messages
together a bit confusing here.  Why would Git merge if uptodate?

I don't think I will have time to investigate in the comming weeks but
you should be able to reproduce it by following these steps (it is by
now, at least):

  % git clone git://github.com/nvie/gitflow.git
  % cd gitflow
  % git merge origin/master
  %

Thanks,
  
-- 
Nicolas Sebrecht

Re: messages confusing

From: Wincent Colaiuta <hidden>
Date: 2016-06-15 22:49:05

El 06/07/2010, a las 07:35, Nicolas Sebrecht escribió:
Hi all,

I had those messages today

 % git merge origin/master
   Already uptodate!
   Merge made by recursive.
 %

with git version 1.7.2.rc1.210.g7b476 and I wonder if it is really
intended.  It did create an empty merge commit but I find both messages
together a bit confusing here.  Why would Git merge if uptodate?
In any case, "uptodate" should be written as "up-to-date" for consistency with other user-visible messages in Git and in the docs.

Wincent

[PATCH] use "up-to-date" in messages instead of "uptodate" for consistency

From: Nicolas Sebrecht <hidden>
Date: 2016-06-15 22:49:05

Signed-off-by: Nicolas Sebrecht <redacted>
---
 merge-recursive.c |    2 +-
 unpack-trees.c    |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index 856e98c..fb6aa4a 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1214,7 +1214,7 @@ int merge_trees(struct merge_options *o,
 	}
 
 	if (sha_eq(common->object.sha1, merge->object.sha1)) {
-		output(o, 0, "Already uptodate!");
+		output(o, 0, "Already up-to-date!");
 		*result = head;
 		return 1;
 	}
diff --git a/unpack-trees.c b/unpack-trees.c
index 8cf0da3..024846e 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -22,7 +22,7 @@ static struct unpack_trees_error_msgs unpack_plumbing_errors = {
 	"Entry '%s' would be overwritten by merge. Cannot merge.",
 
 	/* not_uptodate_file */
-	"Entry '%s' not uptodate. Cannot merge.",
+	"Entry '%s' not up-to-date. Cannot merge.",
 
 	/* not_uptodate_dir */
 	"Updating '%s' would lose untracked files in it",
@@ -34,7 +34,7 @@ static struct unpack_trees_error_msgs unpack_plumbing_errors = {
 	"Entry '%s' overlaps with '%s'.  Cannot bind.",
 
 	/* sparse_not_uptodate_file */
-	"Entry '%s' not uptodate. Cannot update sparse checkout.",
+	"Entry '%s' not up-to-date. Cannot update sparse checkout.",
 
 	/* would_lose_orphaned */
 	"Working tree file '%s' would be %s by sparse checkout update.",
-- 
1.7.2.rc1.210.g7b476

Re: [PATCH] use "up-to-date" in messages instead of "uptodate" for consistency

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:05

Did you run the tests after applying this patch? This looks like it would break:

t/t7110-reset-merge.sh
176:    grep file1 err.log | grep "not uptodate"
192:    grep file1 err.log | grep "not uptodate"

[PATCH v2] use "up-to-date" instead of "uptodate" for consistency

From: Nicolas Sebrecht <hidden>
Date: 2016-06-15 22:49:05

Signed-off-by: Nicolas Sebrecht <redacted>
---

The 06/07/10, Ævar Arnfjörð Bjarmason wrote:
Did you run the tests after applying this patch? This looks like it would break:

t/t7110-reset-merge.sh
176:    grep file1 err.log | grep "not uptodate"
192:    grep file1 err.log | grep "not uptodate"
I forgot about them. Thanks for a reminder.


 Documentation/git-checkout.txt |    2 +-
 merge-recursive.c              |    2 +-
 t/t7110-reset-merge.sh         |    4 ++--
 unpack-trees.c                 |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 261dd90..c04eceb 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -263,7 +263,7 @@ the above checkout would fail like this:
 +
 ------------
 $ git checkout mytopic
-fatal: Entry 'frotz' not uptodate. Cannot merge.
+fatal: Entry 'frotz' not up-to-date. Cannot merge.
 ------------
 +
 You can give the `-m` flag to the command, which would try a
diff --git a/merge-recursive.c b/merge-recursive.c
index 856e98c..fb6aa4a 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1214,7 +1214,7 @@ int merge_trees(struct merge_options *o,
 	}
 
 	if (sha_eq(common->object.sha1, merge->object.sha1)) {
-		output(o, 0, "Already uptodate!");
+		output(o, 0, "Already up-to-date!");
 		*result = head;
 		return 1;
 	}
diff --git a/t/t7110-reset-merge.sh b/t/t7110-reset-merge.sh
index 70cdd8e..6a5f78d 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/unpack-trees.c b/unpack-trees.c
index 8cf0da3..024846e 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -22,7 +22,7 @@ static struct unpack_trees_error_msgs unpack_plumbing_errors = {
 	"Entry '%s' would be overwritten by merge. Cannot merge.",
 
 	/* not_uptodate_file */
-	"Entry '%s' not uptodate. Cannot merge.",
+	"Entry '%s' not up-to-date. Cannot merge.",
 
 	/* not_uptodate_dir */
 	"Updating '%s' would lose untracked files in it",
@@ -34,7 +34,7 @@ static struct unpack_trees_error_msgs unpack_plumbing_errors = {
 	"Entry '%s' overlaps with '%s'.  Cannot bind.",
 
 	/* sparse_not_uptodate_file */
-	"Entry '%s' not uptodate. Cannot update sparse checkout.",
+	"Entry '%s' not up-to-date. Cannot update sparse checkout.",
 
 	/* would_lose_orphaned */
 	"Working tree file '%s' would be %s by sparse checkout update.",
-- 
1.7.2.rc1.212.g4c287

Re: [PATCH v2] use "up-to-date" instead of "uptodate" for consistency

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:05

Nicolas Sebrecht [off-list ref] writes:
quoted hunk
@@ -22,7 +22,7 @@ static struct unpack_trees_error_msgs unpack_plumbing_errors = {
 	"Entry '%s' would be overwritten by merge. Cannot merge.",
 
 	/* not_uptodate_file */
-	"Entry '%s' not uptodate. Cannot merge.",
+	"Entry '%s' not up-to-date. Cannot merge.",
 
 	/* not_uptodate_dir */
 	"Updating '%s' would lose untracked files in it",
@@ -34,7 +34,7 @@ static struct unpack_trees_error_msgs unpack_plumbing_errors = {
 	"Entry '%s' overlaps with '%s'.  Cannot bind.",
 
 	/* sparse_not_uptodate_file */
-	"Entry '%s' not uptodate. Cannot update sparse checkout.",
+	"Entry '%s' not up-to-date. Cannot update sparse checkout.",
 
 	/* would_lose_orphaned */
 	"Working tree file '%s' would be %s by sparse checkout update.",
What word do you see before "errors" on the hunk comment line?

[PATCH v2] Re: use "up-to-date" instead of "uptodate" for consistency

From: Nicolas Sebrecht <hidden>
Date: 2016-06-15 22:49:05

The 06/07/10, Junio C Hamano wrote:
Nicolas Sebrecht [off-list ref] writes:
quoted
@@ -22,7 +22,7 @@ static struct unpack_trees_error_msgs unpack_plumbing_errors = {
What word do you see before "errors" on the hunk comment line?
So you'd rather not touching it? Or wait until the next release cycle?
Or a better commit message? Anything else?

-- 
Nicolas Sebrecht
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help