diff options
author | Stefan Beller <sbeller@google.com> | 2018-03-23 18:21:00 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-26 10:05:55 -0700 |
commit | d0b59866223f7ef0dcd07bff857f651cd921bc02 (patch) | |
tree | 0d073e2c27c760a98cd978c5e34dfb6a4504b579 /builtin | |
parent | object-store: move packed_git and packed_git_mru to object store (diff) | |
download | tgif-d0b59866223f7ef0dcd07bff857f651cd921bc02.tar.xz |
object-store: close all packs upon clearing the object store
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.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/merge.c | 2 | ||||
-rw-r--r-- | builtin/receive-pack.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/builtin/am.c b/builtin/am.c index 5bdd2d7578..47beddbe24 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1859,7 +1859,7 @@ next: */ if (!state->rebasing) { am_destroy(state); - close_all_packs(); + close_all_packs(the_repository->objects); run_command_v_opt(argv_gc_auto, RUN_GIT_CMD); } } diff --git a/builtin/clone.c b/builtin/clone.c index 855947f1ab..7df5932b85 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1218,7 +1218,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) transport_disconnect(transport); if (option_dissociate) { - close_all_packs(); + close_all_packs(the_repository->objects); dissociate_from_references(); } diff --git a/builtin/fetch.c b/builtin/fetch.c index 8ee998ea2e..a39e9d7b15 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1478,7 +1478,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) string_list_clear(&list, 0); - close_all_packs(); + close_all_packs(the_repository->objects); argv_array_pushl(&argv_gc_auto, "gc", "--auto", NULL); if (verbosity < 0) diff --git a/builtin/merge.c b/builtin/merge.c index 30264cfd7c..96d56cbdd2 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -411,7 +411,7 @@ static void finish(struct commit *head_commit, * We ignore errors in 'gc --auto', since the * user should see them. */ - close_all_packs(); + close_all_packs(the_repository->objects); run_command_v_opt(argv_gc_auto, RUN_GIT_CMD); } } diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index b7ce7c7f52..1a298a6711 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -2026,7 +2026,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(); + close_all_packs(the_repository->objects); if (!start_command(&proc)) { if (use_sideband) copy_to_sideband(proc.err, -1, NULL); |