X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=checkout-index.c;h=97845324beb9002a0fed0dd1184988716faa9ed2;hb=d1c5f2a42d7b5c0e3d3862212dea1f09809c4963;hp=f32513c507ff39e09082a9ae7b3bf157f7d21fe9;hpb=215a7ad1ef790467a4cd3f0dcffbd6e5f04c38f7;p=git.git diff --git a/checkout-index.c b/checkout-index.c index f32513c5..97845324 100644 --- a/checkout-index.c +++ b/checkout-index.c @@ -63,15 +63,20 @@ static int checkout_file(const char *name) static int checkout_all(void) { - int i; + int i, errs = 0; for (i = 0; i < active_nr ; i++) { struct cache_entry *ce = active_cache[i]; if (ce_stage(ce)) continue; if (checkout_entry(ce, &state) < 0) - return -1; + errs++; } + if (errs) + /* we have already done our error reporting. + * exit with the same code as die(). + */ + exit(128); return 0; }