Merge branch 'jc/maint-commit-ignore-i-t-a' into maint

* jc/maint-commit-ignore-i-t-a:
  commit: ignore intent-to-add entries instead of refusing

Conflicts:
	cache-tree.c
This commit is contained in:
Junio C Hamano
2012-02-16 14:08:00 -08:00
2 changed files with 8 additions and 6 deletions

View File

@ -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');