summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-03-23 17:21:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-26 17:05:55 (GMT)
commitd0b59866223f7ef0dcd07bff857f651cd921bc02 (patch)
tree0d073e2c27c760a98cd978c5e34dfb6a4504b579 /builtin
parenta80d72db2a73174b3f22142eb2014b33696fd795 (diff)
downloadgit-d0b59866223f7ef0dcd07bff857f651cd921bc02.zip
git-d0b59866223f7ef0dcd07bff857f651cd921bc02.tar.gz
git-d0b59866223f7ef0dcd07bff857f651cd921bc02.tar.bz2
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.c2
-rw-r--r--builtin/clone.c2
-rw-r--r--builtin/fetch.c2
-rw-r--r--builtin/merge.c2
-rw-r--r--builtin/receive-pack.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 5bdd2d7..47beddb 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 855947f..7df5932 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 8ee998e..a39e9d7 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 30264cf..96d56cb 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 b7ce7c7..1a298a6 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);