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:
authorBrandon Casey <drafnel@gmail.com>2008-05-10 08:01:56 +0400
committerJunio C Hamano <gitster@pobox.com>2008-05-11 22:26:02 +0400
commita37cce3b23afa2c88baa2f1369c585e05bcf4526 (patch)
tree95b2cbe0d50f4187a9220b8209a12bc2c1e3547b /builtin-gc.c
parentccc1297226b184c40459e9d373cc9eebfb7bd898 (diff)
git-gc: always use -A when manually repacking
Now that repack -A will leave unreferenced objects unpacked, there is no reason to use the -a option to repack (which will discard unreferenced objects). The unpacked unreferenced objects will not be repacked by a subsequent repack, and will eventually be pruned by git-gc based on the gc.pruneExpire config option.
Diffstat (limited to 'builtin-gc.c')
-rw-r--r--builtin-gc.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/builtin-gc.c b/builtin-gc.c
index f99ebc7926..6db2f513b7 100644
--- a/builtin-gc.c
+++ b/builtin-gc.c
@@ -256,17 +256,8 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
"performance. You may also\n"
"run \"git gc\" manually. See "
"\"git help gc\" for more information.\n");
- } else {
- /*
- * Use safer (for shared repos) "-A" option to
- * repack when not pruning. Auto-gc makes its
- * own decision.
- */
- if (prune)
- append_option(argv_repack, "-a", MAX_ADD);
- else
- append_option(argv_repack, "-A", MAX_ADD);
- }
+ } else
+ append_option(argv_repack, "-A", MAX_ADD);
if (pack_refs && run_command_v_opt(argv_pack_refs, RUN_GIT_CMD))
return error(FAILED_RUN, argv_pack_refs[0]);