diff --git a/cache-tree.c b/cache-tree.c
index 8de39590d57e14d08ee4d04b74965191aa905b29..bf03cb7fcefdc7e119203f096b367592d5b7cf8c 100644 (file)
--- a/cache-tree.c
+++ b/cache-tree.c
funny = 0;
for (i = 0; i < entries; i++) {
struct cache_entry *ce = cache[i];
funny = 0;
for (i = 0; i < entries; i++) {
struct cache_entry *ce = cache[i];
- if (ce_stage(ce) || (ce->ce_flags & CE_INTENT_TO_ADD)) {
+ if (ce_stage(ce)) {
if (silent)
return -1;
if (10 < ++funny) {
if (silent)
return -1;
if (10 < ++funny) {
mode, sha1_to_hex(sha1), entlen+baselen, path);
}
mode, sha1_to_hex(sha1), entlen+baselen, path);
}
- if (ce->ce_flags & CE_REMOVE)
- continue; /* entry being removed */
+ if (ce->ce_flags & (CE_REMOVE | CE_INTENT_TO_ADD))
+ continue; /* entry being removed or placeholder */
strbuf_grow(&buffer, entlen + 100);
strbuf_addf(&buffer, "%o %.*s%c", mode, entlen, path + baselen, '\0');
strbuf_grow(&buffer, entlen + 100);
strbuf_addf(&buffer, "%o %.*s%c", mode, entlen, path + baselen, '\0');