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

[PATCH] "not uptodate" changed to "has local changes"

From
Tim Harper <timcharper@gmail.com>
Date
May 3, 2008, 16:59 UTC
Message-ID
<1209833972-12256-1-git-send-email-timcharper@gmail.com>
When doing a merge, the message says "file.txt: needs update", or "file.txt: not uptodate, cannot merge".   While internally 'uptodate' makes sense, from the outside it's a mystery.
This patch will make git a little more human friendly, reporting "file.txt: has local changes".
---
 read-cache.c   |    2 +-
 unpack-trees.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/read-cache.c b/read-cache.c
index a92b25b..e890b27 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -999,7 +999,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, const char **p
 			}
 			if (quiet)
 				continue;
-			printf("%s: needs update\n", ce->name);
+			printf("%s: has local changes\n", ce->name);
 			has_errors = 1;
 			continue;
 		}
diff --git a/unpack-trees.c b/unpack-trees.c
index a59f475..1d67e08 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -427,7 +427,7 @@ static int verify_uptodate(struct cache_entry *ce,
 	if (errno == ENOENT)
 		return 0;
 	return o->gently ? -1 :
-		error("Entry '%s' not uptodate. Cannot merge.", ce->name);
+		error("Entry '%s' has local changes. Cannot merge.", ce->name);
 }
 
 static void invalidate_ce_path(struct cache_entry *ce, struct unpack_trees_options *o)
-- 
1.5.5.1
Next: Mike Ralphson
Message 1 of 24 in “"not uptodate" changed to "has local changes"”
  1. "not uptodate" changed to "has local changes"Tim Harper, May 3, 2008
  2. Mike RalphsonMay 6, 2008
  3. André Goddard RosaMay 16, 2008
  4. Johannes SchindelinMay 16, 2008
  5. Holger SchurigMay 16, 2008
  6. Francis MoreauMay 16, 2008
  7. Johannes SchindelinMay 16, 2008
  8. Kevin BallardMay 16, 2008
  9. André Goddard RosaMay 17, 2008
  10. Johannes SchindelinMay 17, 2008
  11. Steven WalterMay 17, 2008
  12. Sverre RabbelierMay 17, 2008
  13. Johannes SchindelinMay 17, 2008
  14. Sverre RabbelierMay 17, 2008
  15. Re* [PATCH] "not uptodate" changed to "has local changes"Junio C Hamano, May 17, 2008
  16. Sverre RabbelierMay 17, 2008
  17. Wincent ColaiutaMay 19, 2008
  18. Junio C HamanoMay 19, 2008
  19. Sverre RabbelierMay 19, 2008
  20. Daniel BarkalowMay 19, 2008
  21. Junio C HamanoMay 21, 2008
  22. Wincent ColaiutaMay 17, 2008
  23. Matthieu MoyMay 17, 2008
  24. Sverre RabbelierMay 18, 2008

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.