From: Junio C Hamano Date: Tue, 16 Oct 2018 07:16:02 +0000 (+0900) Subject: Merge branch 'jn/gc-auto-prep' X-Git-Tag: v2.20.0-rc0~182 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99913dd11809b2a5d6a4644c52bc795d124d48e0;p=git Merge branch 'jn/gc-auto-prep' Code clean-up. * jn/gc-auto-prep: gc: exit with status 128 on failure gc: improve handling of errors reading gc.log --- 99913dd11809b2a5d6a4644c52bc795d124d48e0 diff --cc builtin/gc.c index 6591ddbe83,95c8afd07b..705c3d3851 --- a/builtin/gc.c +++ b/builtin/gc.c @@@ -611,13 -605,11 +608,12 @@@ int cmd_gc(int argc, const char **argv atexit(process_log_file_at_exit); } - if (gc_before_repack()) - return -1; + gc_before_repack(); if (!repository_format_precious_objects) { + close_all_packs(the_repository->objects); if (run_command_v_opt(repack.argv, RUN_GIT_CMD)) - return error(FAILED_RUN, repack.argv[0]); + die(FAILED_RUN, repack.argv[0]); if (prune_expire) { argv_array_push(&prune, prune_expire);