Merge branch 'jn/gc-auto-prep'
authorJunio C Hamano <gitster@pobox.com>
Tue, 16 Oct 2018 07:16:02 +0000 (16:16 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Oct 2018 07:16:02 +0000 (16:16 +0900)
Code clean-up.

* jn/gc-auto-prep:
  gc: exit with status 128 on failure
  gc: improve handling of errors reading gc.log

1  2 
builtin/gc.c
t/t6500-gc.sh

diff --cc 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);
diff --cc t/t6500-gc.sh
Simple merge