1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-25 08:56:25 +02:00
git/builtin
Jeff King 7e52f5660e gc: do not explode objects which will be immediately pruned
When we pack everything into one big pack with "git repack
-Ad", any unreferenced objects in to-be-deleted packs are
exploded into loose objects, with the intent that they will
be examined and possibly cleaned up by the next run of "git
prune".

Since the exploded objects will receive the mtime of the
pack from which they come, if the source pack is old, those
loose objects will end up pruned immediately. In that case,
it is much more efficient to skip the exploding step
entirely for these objects.

This patch teaches pack-objects to receive the expiration
information and avoid writing these objects out. It also
teaches "git gc" to pass the value of gc.pruneexpire to
repack (which in turn learns to pass it along to
pack-objects) so that this optimization happens
automatically during "git gc" and "git gc --auto".

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-11 11:09:49 -07:00
..
add.c Merge branch 'js/add-e-submodule-fix' into maint 2012-02-13 11:42:18 -08:00
annotate.c
apply.c Use correct grammar in diffstat summary line 2012-02-03 23:19:42 -08:00
archive.c
bisect--helper.c
blame.c Merge branch 'zj/decimal-width' 2012-02-20 00:15:11 -08:00
branch.c Merge branch 'cn/maint-branch-with-bad' into maint 2012-03-04 22:17:52 -08:00
bundle.c
cat-file.c drop odd return value semantics from userdiff_config 2012-02-07 10:44:54 -08:00
check-attr.c
check-ref-format.c
checkout-index.c
checkout.c Merge branch 'jc/checkout-out-of-unborn' into maint 2012-02-16 14:18:06 -08:00
clean.c
clone.c Merge branch 'cb/transfer-no-progress' into maint 2012-02-21 15:14:37 -08:00
commit-tree.c Merge branch 'jc/show-sig' 2012-01-06 12:44:07 -08:00
commit.c Merge branch 'jx/i18n-more-marking' into maint 2012-02-16 13:59:53 -08:00
config.c config: remove useless assignment 2012-03-28 15:19:17 -07:00
count-objects.c
describe.c
diff-files.c
diff-index.c
diff-tree.c
diff.c diff --stat: add config option to limit graph width 2012-03-01 09:15:58 -08:00
fast-export.c Merge branch 'rs/no-no-no-parseopt' 2012-03-01 20:59:31 -08:00
fetch-pack.c Merge branch 'cb/transfer-no-progress' 2012-02-20 00:14:55 -08:00
fetch.c Merge branch 'cb/transfer-no-progress' 2012-02-20 00:14:55 -08:00
fmt-merge-msg.c
for-each-ref.c
fsck.c fsck: --no-dangling omits "dangling object" information 2012-02-28 14:55:39 -08:00
gc.c gc: do not explode objects which will be immediately pruned 2012-04-11 11:09:49 -07:00
grep.c Merge branch 'rs/no-no-no-parseopt' 2012-03-01 20:59:31 -08:00
hash-object.c
help.c
index-pack.c index-pack: eliminate unlimited recursion in get_base_data() 2012-01-16 14:34:33 -08:00
init-db.c
log.c diff --stat: add config option to limit graph width 2012-03-01 09:15:58 -08:00
ls-files.c
ls-remote.c
ls-tree.c
mailinfo.c mailinfo: with -b, keep space after [foo] 2012-01-16 16:06:57 -08:00
mailsplit.c
merge-base.c
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Sync with 1.7.9.6 2012-04-02 13:11:49 -07:00
mktag.c
mktree.c
mv.c Merge branch 'jk/maint-mv' into maint 2011-12-28 11:32:36 -08:00
name-rev.c
notes.c Merge branch 'nd/war-on-nul-in-commit' 2011-12-22 11:27:26 -08:00
pack-objects.c gc: do not explode objects which will be immediately pruned 2012-04-11 11:09:49 -07:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c fix deletion of .git/objects sub-directories in git-prune/repack 2012-03-07 10:24:33 -08:00
prune.c fix deletion of .git/objects sub-directories in git-prune/repack 2012-03-07 10:24:33 -08:00
push.c Merge branch 'fc/push-prune' 2012-02-26 23:05:45 -08:00
read-tree.c
receive-pack.c Merge branch 'cb/receive-pack-keep-errors' into maint 2012-02-21 15:14:41 -08:00
reflog.c
remote-ext.c
remote-fd.c
remote.c Merge branch 'pj/remote-set-branches-usage-fix' into maint 2012-02-27 15:33:33 -08:00
replace.c
rerere.c
reset.c
rev-list.c rev-list: fix --verify-objects --quiet becoming --objects 2012-02-28 10:47:30 -08:00
rev-parse.c
revert.c Merge branch 'maint-1.7.8' into maint 2012-03-20 15:53:30 -07:00
rm.c
send-pack.c push/fetch/clone --no-progress suppresses progress output 2012-02-13 13:06:53 -08:00
shortlog.c
show-branch.c
show-ref.c
stripspace.c
symbolic-ref.c symbolic-ref --short: abbreviate the output unambiguously 2012-02-27 15:58:36 -08:00
tag.c Merge branch 'tg/tag-points-at' 2012-02-20 00:15:28 -08:00
tar-tree.c
unpack-file.c
unpack-objects.c
update-index.c
update-ref.c
update-server-info.c
upload-archive.c
var.c
verify-pack.c
verify-tag.c verify-tag: Parse GPG configuration options. 2012-03-08 14:03:07 -08:00
write-tree.c