diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-09 15:25:37 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-09 15:25:37 -0700 |
commit | 5cb7c73589059b557f0d690ed6bcfde46ef2d234 (patch) | |
tree | 1aa18e271907b69b4d49494231f8acc6f950ff4d /builtin | |
parent | Merge branch 'ds/commit-graph-write-refactor' (diff) | |
parent | packfile: rename close_all_packs to close_object_store (diff) | |
download | tgif-5cb7c73589059b557f0d690ed6bcfde46ef2d234.tar.xz |
Merge branch 'ds/close-object-store'
The commit-graph file is now part of the "files that the runtime
may keep open file descriptors on, all of which would need to be
closed when done with the object store", and the file descriptor to
an existing commit-graph file now is closed before "gc" finalizes a
new instance to replace it.
* ds/close-object-store:
packfile: rename close_all_packs to close_object_store
packfile: close commit-graph in close_all_packs
commit-graph: use raw_object_store when closing
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 78389d08b6..252e37ddf0 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1801,7 +1801,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 5b9ebe9947..189ea1c2a0 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1252,7 +1252,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 f2be50a4a3..c9b92b1e52 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1680,7 +1680,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 8ba9bd2472..be8e0bfcbe 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -653,7 +653,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]); @@ -681,7 +681,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 6e99aead46..aad5a9504c 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -453,7 +453,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 b8116db487..51438d08f2 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -741,7 +741,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 77b7122456..610eadf5f0 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -2042,7 +2042,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 caca113927..f834b5551b 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -422,7 +422,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. |