diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2019-05-17 21:41:49 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-12 21:33:54 +0300 |
commit | 2d511cfc0bfe1d2b98ba8b272ddd9ba83e84e5f8 (patch) | |
tree | 1bf0a1bf940a3c1a4db47c88a23fbf8b3bb7a080 /builtin | |
parent | 5472c32c3724e1404c3d80368edc28910969c29a (diff) |
packfile: rename close_all_packs to close_object_store
The close_all_packs() method is now responsible for more than just pack-files.
It also closes the commit-graph and the multi-pack-index. Rename the function
to be more descriptive of its larger role. The name also fits because the
input parameter is a raw_object_store.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/am.c | 2 | ||||
-rw-r--r-- | builtin/clone.c | 2 | ||||
-rw-r--r-- | builtin/fetch.c | 2 | ||||
-rw-r--r-- | builtin/gc.c | 4 | ||||
-rw-r--r-- | builtin/merge.c | 2 | ||||
-rw-r--r-- | builtin/rebase.c | 2 | ||||
-rw-r--r-- | builtin/receive-pack.c | 2 | ||||
-rw-r--r-- | builtin/repack.c | 2 |
8 files changed, 9 insertions, 9 deletions
diff --git a/builtin/am.c b/builtin/am.c index 58a2aef28bb..9315d32d2a0 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1800,7 +1800,7 @@ next: */ if (!state->rebasing) { am_destroy(state); - close_all_packs(the_repository->objects); + close_object_store(the_repository->objects); run_command_v_opt(argv_gc_auto, RUN_GIT_CMD); } } diff --git a/builtin/clone.c b/builtin/clone.c index 50bde996180..82ce682c806 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1240,7 +1240,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) transport_disconnect(transport); if (option_dissociate) { - close_all_packs(the_repository->objects); + close_object_store(the_repository->objects); dissociate_from_references(); } diff --git a/builtin/fetch.c b/builtin/fetch.c index b620fd54b4e..3aec95608ff 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1670,7 +1670,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) string_list_clear(&list, 0); - close_all_packs(the_repository->objects); + close_object_store(the_repository->objects); argv_array_pushl(&argv_gc_auto, "gc", "--auto", NULL); if (verbosity < 0) diff --git a/builtin/gc.c b/builtin/gc.c index df2573f124d..20c8f1bfe80 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -632,7 +632,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix) gc_before_repack(); if (!repository_format_precious_objects) { - close_all_packs(the_repository->objects); + close_object_store(the_repository->objects); if (run_command_v_opt(repack.argv, RUN_GIT_CMD)) die(FAILED_RUN, repack.argv[0]); @@ -660,7 +660,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix) report_garbage = report_pack_garbage; reprepare_packed_git(the_repository); if (pack_garbage.nr > 0) { - close_all_packs(the_repository->objects); + close_object_store(the_repository->objects); clean_pack_garbage(); } diff --git a/builtin/merge.c b/builtin/merge.c index e47d77baeeb..72d7a7c9090 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -449,7 +449,7 @@ static void finish(struct commit *head_commit, * We ignore errors in 'gc --auto', since the * user should see them. */ - close_all_packs(the_repository->objects); + close_object_store(the_repository->objects); run_command_v_opt(argv_gc_auto, RUN_GIT_CMD); } } diff --git a/builtin/rebase.c b/builtin/rebase.c index 7c7bc13e912..ed30fcd6333 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -328,7 +328,7 @@ static int finish_rebase(struct rebase_options *opts) delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF); apply_autostash(opts); - close_all_packs(the_repository->objects); + close_object_store(the_repository->objects); /* * We ignore errors in 'gc --auto', since the * user should see them. diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index d58b7750b6b..92cd1f508c1 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -2032,7 +2032,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) proc.git_cmd = 1; proc.argv = argv_gc_auto; - close_all_packs(the_repository->objects); + close_object_store(the_repository->objects); if (!start_command(&proc)) { if (use_sideband) copy_to_sideband(proc.err, -1, NULL); diff --git a/builtin/repack.c b/builtin/repack.c index 67f8978043a..4de8b6600c4 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -419,7 +419,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix) if (!names.nr && !po_args.quiet) printf_ln(_("Nothing new to pack.")); - close_all_packs(the_repository->objects); + close_object_store(the_repository->objects); /* * Ok we have prepared all new packfiles. |