diff --git a/unpack-trees.c b/unpack-trees.c
index e22b9ec408db64a5fa05328dfc06bdc99bdbce4d..c3d3436adda39dfb8e48e3452479ea0f02546063 100644 (file)
--- a/unpack-trees.c
+++ b/unpack-trees.c
string_list_clear(rejects, 0);
}
if (something_displayed)
- printf("Aborting\n");
+ fprintf(stderr, "Aborting\n");
}
/*
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;
display_error_msgs(o);
mark_all_ce_unused(o->src_index);
ret = unpack_failed(o, NULL);
+ if (o->exiting_early)
+ ret = 0;
goto done;
}