X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=checkout-cache.c;h=5cd473ca1ca8cf5ced71be70e6ed76a484575b08;hb=4696cb93d1e2ded452e4e673633fd6495698ffcd;hp=b909f5d9a0ec10c99b850bf794cb7a4191cd0740;hpb=fa06d442c6c5113fcff9991f349157bdb0c4b989;p=git.git diff --git a/checkout-cache.c b/checkout-cache.c index b909f5d9..5cd473ca 100644 --- a/checkout-cache.c +++ b/checkout-cache.c @@ -121,8 +121,15 @@ static int checkout_file(const char *name) { int pos = cache_name_pos(name, strlen(name)); if (pos < 0) { - if (!quiet) - fprintf(stderr, "checkout-cache: %s is not in the cache\n", name); + if (!quiet) { + pos = -pos - 1; + fprintf(stderr, + "checkout-cache: %s is %s.\n", + name, + (pos < active_nr && + !strcmp(active_cache[pos]->name, name)) ? + "unmerged" : "not in the cache"); + } return -1; } return checkout_entry(active_cache[pos]); @@ -134,6 +141,8 @@ static int checkout_all(void) for (i = 0; i < active_nr ; i++) { struct cache_entry *ce = active_cache[i]; + if (ce_stage(ce)) + continue; if (checkout_entry(ce) < 0) return -1; }