Re: [PATCH 2/2] git-gc: skip stashes when expiring reflogs
- From
- Eric Raible <raible@gmail.com>
- Date
- Jun 16, 2008, 03:33 UTC
- Message-ID
- <279b37b20806152033o58350d77v77f859542b4542b3@mail.gmail.com>
- In-Reply-To
- <7vabhne15k.fsf@gitster.siamese.dyndns.org>
2008/6/14 Junio C Hamano <gitster@pobox.com>:
Show 19 quoted lines
> I think the steps from here on would be: > > - Apply the patch in your message I am responding to, so that a stash > that is kept forever will not pin the unnecessary history behind it in > the repository. As you said there is no reason to make the base commit > (H) actually the same as the commit in the true history --- the only > thing we care about it is its tree object; > > - Design and decide the way to tell git to make stash entries unexpirable > (or maybe have very long expiration period). I am leaning toward a > configuration option that lets you specify expiration period per ref, > rather than marking individual reflog entries as I suggested earlier; > > - Make the default for new repositories' stash reflog expiry period > "never", by setting the above configuration upon "git init". > > None of the above should obviously be in 1.5.6, but I think even the third > step to the change the default would be acceptable in the next 1.6.0 > release.
In addition, how about a new stash option "expire", as in: git stash expire --before=2.weeks.ago
The default for expire should probably be default expiration period; if set to "never" then a usage message could be printed.
I for one would choose "never", so the above would be a simple way of cleaning up if/when too much cruft accumulates.
- Eric