summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6ad6d3d)
raw | patch | inline | side by side (parent: 6ad6d3d)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 18 Apr 2005 17:42:48 +0000 (10:42 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 18 Apr 2005 17:42:48 +0000 (10:42 -0700) |
The "update-cache --refresh" command attempts refresh_entry()
on unmerged path, which results in as many "needs update" messages
as there are unmerged stages for that path. This does not do
any harm to the working directory, but it is confusing.
Here is a fix.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
on unmerged path, which results in as many "needs update" messages
as there are unmerged stages for that path. This does not do
any harm to the working directory, but it is confusing.
Here is a fix.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
update-cache.c | patch | blob | history |
diff --git a/update-cache.c b/update-cache.c
index 7c3a143559d25f4231ab8225b49e5b0938de7baf..68d2f95c1cfc90cc6d39bb4ec2f25f4ebd944d69 100644 (file)
--- a/update-cache.c
+++ b/update-cache.c
int i;
for (i = 0; i < active_nr; i++) {
- struct cache_entry *ce = active_cache[i];
- struct cache_entry *new = refresh_entry(ce);
+ struct cache_entry *ce, *new;
+ ce = active_cache[i];
+ if (ce_stage(ce)) {
+ printf("%s: needs merge\n", ce->name);
+ while ((i < active_nr) &&
+ ! strcmp(active_cache[i]->name, ce->name))
+ i++;
+ i--;
+ continue;
+ }
+ new = refresh_entry(ce);
if (!new) {
printf("%s: needs update\n", ce->name);
continue;