summaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-13 06:42:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-02-13 06:42:10 (GMT)
commit44a1020d4d41b90be80745c7a16e2a49fa612b56 (patch)
treefd734df8e43fb1dc956ac045eb0a699d09fb1176 /cache-tree.c
parent1efb73322ad800cc679496124e8a1f498b52e5cb (diff)
parent3f6d56de5f99ec5f0667bef4411f2515b253a5b2 (diff)
downloadgit-44a1020d4d41b90be80745c7a16e2a49fa612b56.zip
git-44a1020d4d41b90be80745c7a16e2a49fa612b56.tar.gz
git-44a1020d4d41b90be80745c7a16e2a49fa612b56.tar.bz2
Merge branch 'jc/maint-commit-ignore-i-t-a'
* jc/maint-commit-ignore-i-t-a: commit: ignore intent-to-add entries instead of refusing Conflicts: cache-tree.c
Diffstat (limited to 'cache-tree.c')
-rw-r--r--cache-tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cache-tree.c b/cache-tree.c
index 8de3959..bf03cb7 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -158,7 +158,7 @@ static int verify_cache(struct cache_entry **cache,
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) {
@@ -338,8 +338,8 @@ static int update_one(struct cache_tree *it,
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');