From: Mikko Rantalainen <mikko.rantalainen@peda.net>
To: git@vger.kernel.org
Subject: Improve support for 'git config gc.reflogExpire never'
Date: Fri, 8 Mar 2019 10:27:11 +0200 [thread overview]
Message-ID: <39a0796a-7220-1e81-e7fe-3bf7329ed7de@peda.net> (raw)
If I configure bare repo with
git config gc.pruneExpire never
git config gc.reflogExpire never
then git will never garbage collect any commit ever stored in the repo.
This is what I want.
However, all commits referenced only via reflog are kept as loose
objects and will not be included in packs. In long run this will cause
warning: There are too many unreachable loose objects; run 'git prune'
to remove them.
and the performance of the repository will slowly decrease.
If I have understood correctly, git should notice that reflog will keep
referenced commits forever and include all those commits in packs
instead of keeping those as loose forever.
A more generic behavior might be to always compress all loose commits in
(one?) special pack so the performance would stay good even if
gc.reflogExpire is very long instead of "never".
Discussion about this case:
https://stackoverflow.com/questions/28092485/how-to-prevent-garbage-collection-in-git
https://stackoverflow.com/questions/55043693/is-it-possible-to-get-git-gc-to-pack-reflog-objects
--
Mikko
next reply other threads:[~2019-03-08 8:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 8:27 Mikko Rantalainen [this message]
2019-03-19 6:47 ` Improve support for 'git config gc.reflogExpire never' Jeff King
2019-03-19 9:30 ` Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39a0796a-7220-1e81-e7fe-3bf7329ed7de@peda.net \
--to=mikko.rantalainen@peda.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).