Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-27 01:55:24 +0300
committerJunio C Hamano <gitster@pobox.com>2015-10-27 01:55:25 +0300
commitfa46579555583a9799d8495f632b14cddd65db6e (patch)
treea2f1155dfc4bd642795ec59e943776ef68e26f67 /builtin/gc.c
parent9d4a0692dcd528501ced5cfde64bd9af1b67d803 (diff)
parent067fbd4105c5aa8260a73cc6961854be0e93fa03 (diff)
Merge branch 'jk/repository-extension'
Prepare for Git on-disk repository representation to undergo backward incompatible changes by introducing a new repository format version "1", with an extension mechanism. * jk/repository-extension: introduce "preciousObjects" repository extension introduce "extensions" form of core.repositoryformatversion
Diffstat (limited to 'builtin/gc.c')
-rw-r--r--builtin/gc.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index eeeb21b1c4..b677923ffc 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -394,15 +394,17 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
if (gc_before_repack())
return -1;
- if (run_command_v_opt(repack.argv, RUN_GIT_CMD))
- return error(FAILED_RUN, repack.argv[0]);
-
- if (prune_expire) {
- argv_array_push(&prune, prune_expire);
- if (quiet)
- argv_array_push(&prune, "--no-progress");
- if (run_command_v_opt(prune.argv, RUN_GIT_CMD))
- return error(FAILED_RUN, prune.argv[0]);
+ if (!repository_format_precious_objects) {
+ if (run_command_v_opt(repack.argv, RUN_GIT_CMD))
+ return error(FAILED_RUN, repack.argv[0]);
+
+ if (prune_expire) {
+ argv_array_push(&prune, prune_expire);
+ if (quiet)
+ argv_array_push(&prune, "--no-progress");
+ if (run_command_v_opt(prune.argv, RUN_GIT_CMD))
+ return error(FAILED_RUN, prune.argv[0]);
+ }
}
if (prune_worktrees_expire) {