Re: [PATCH 2/2] git-gc: skip stashes when expiring reflogs
- From
Jeff King <peff@peff.net>
- Date
- Jun 12, 2008, 04:18 UTC
- Message-ID
- <20080612041847.GB24868@sigill.intra.peff.net>
- In-Reply-To
- <co7kgJpJNdIs2f8n_PwYKAS7MwV9t1G_P3BPr1eXTZ4ytUHcsPvVaw@cipher.nrlssc.navy.mil>
On Wed, Jun 11, 2008 at 06:25:23PM -0500, Brandon Casey wrote:
Show 12 quoted lines
> Yes, I think usually stashes are used for very short term storage. At the
> same time, I don't expect a stash (however old) to disappear without me
> explicitly deleting it.
>
> In particular, I don't want to experience this:
>
> $ git stash list
> stash@{0}: WIP on master: 8c372fb... git-cvsimport: do not fail when CVS is /
> $ git pull
> $ git stash apply
> fatal: Needed a single revision
> : no valid stashed state foundDid that actually happen to you? Because it seems kind of unlikely to me that you would perform this exact sequence of events, _exactly_ 90 days after stashing (i.e., the 90 day period expires sometime between "git stash list" and "git pull"). Not to mention that you actually _care_ about the stash 90 days later.
So yes, I would hate for that to happen, too. However, I think there is a real benefit to garbage collecting stashes, and the scenario you describe seems implausibly unlikely.
-Peff