summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--update-cache.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/update-cache.c b/update-cache.c
index 7c3a143..68d2f95 100644
--- a/update-cache.c
+++ b/update-cache.c
@@ -196,9 +196,18 @@ static void refresh_cache(void)
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;