diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-12-03 00:38:12 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-12-03 00:38:12 -0800 |
commit | ae26e7c74970281bd3597c79e44a8b54a927bbe1 (patch) | |
tree | ab91c9e9de975fd469f81795a5f53026050b2b71 /cache-tree.c | |
parent | Merge branch 'maint' (diff) | |
parent | git add --intent-to-add: do not let an empty blob be committed by accident (diff) | |
download | tgif-ae26e7c74970281bd3597c79e44a8b54a927bbe1.tar.xz |
Merge branch 'jc/rm-i-t-a'
* jc/rm-i-t-a:
git add --intent-to-add: do not let an empty blob be committed by accident
git add --intent-to-add: fix removal of cached emptiness
builtin-rm.c: explain and clarify the "local change" logic
Extend index to save more flags
Diffstat (limited to 'cache-tree.c')
-rw-r--r-- | cache-tree.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cache-tree.c b/cache-tree.c index 5f8ee87bb1..3d8f218a5f 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -155,13 +155,17 @@ 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)) { + if (ce_stage(ce) || (ce->ce_flags & CE_INTENT_TO_ADD)) { if (10 < ++funny) { fprintf(stderr, "...\n"); break; } - fprintf(stderr, "%s: unmerged (%s)\n", - ce->name, sha1_to_hex(ce->sha1)); + if (ce_stage(ce)) + fprintf(stderr, "%s: unmerged (%s)\n", + ce->name, sha1_to_hex(ce->sha1)); + else + fprintf(stderr, "%s: not added yet\n", + ce->name); } } if (funny) |