X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=cache-tree.c;h=3d8f218a5f9e838b15e1d56113a4dd56904ee544;hb=0959df45253de579598dfc431ba5e370acd0ab8e;hp=73cb3407077275f82677839d2c9e794c12833c95;hpb=77599cc0bbd0a08defc3bfa80ca52d931d8dc786;p=git.git diff --git a/cache-tree.c b/cache-tree.c index 73cb34070..3d8f218a5 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) @@ -507,7 +511,7 @@ struct cache_tree *cache_tree_read(const char *buffer, unsigned long size) return read_one(&buffer, &size); } -struct cache_tree *cache_tree_find(struct cache_tree *it, const char *path) +static struct cache_tree *cache_tree_find(struct cache_tree *it, const char *path) { while (*path) { const char *slash;