X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=unpack-trees.c;h=cc616c3f991a655d10fcac15055fcdfafa8620fd;hb=be22d92eac809ad2bfa2b7c83ad7cad5a15f1c43;hp=e22b9ec408db64a5fa05328dfc06bdc99bdbce4d;hpb=d48929e1c39a01cf2d909ba140110df481c8912d;p=git.git diff --git a/unpack-trees.c b/unpack-trees.c index e22b9ec40..cc616c3f9 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -593,7 +593,7 @@ static int unpack_nondirectories(int n, unsigned long mask, static int unpack_failed(struct unpack_trees_options *o, const char *message) { discard_index(&o->result); - if (!o->gently) { + if (!o->gently && !o->exiting_early) { if (message) return error("%s", message); return -1; @@ -1133,6 +1133,8 @@ return_failed: display_error_msgs(o); mark_all_ce_unused(o->src_index); ret = unpack_failed(o, NULL); + if (o->exiting_early) + ret = 0; goto done; }