Re: [PATCH 2/2] git-gc: skip stashes when expiring reflogs
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Jun 12, 2008, 22:10 UTC
- Message-ID
- <fRW8sBboq1iMWGtwlFUpiDE6HkG2OzTHQ13Xtne_hLyGoZQw04GL7Q@cipher.nrlssc.navy.mil>
- In-Reply-To
- <7vhcbyz5pp.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 12 quoted lines
> Brandon Casey <casey@nrlssc.navy.mil> writes: > >> The fact that this caveat is not mentioned anywhere in the stash >> documentation or anywhere in the commit log related to git-stash.sh makes >> me think that this idea of 'a limited amount of time' was possibly not a >> design decision but merely a side effect of stashes being implemented using the >> reflog. Of course I didn't pay any attention to the discussions about stash >> back when it was implemented, so I may definitely be wrong. > > I do not deeply care either way, but perhaps > > http://thread.gmane.org/gmane.comp.version-control.git/50737/focus=50863
Ahh, you reveal that you were not always a supporter of "stash per branch" in this thread. :)
> and yes use of reflog was more or less conscious thing and the mechanism > is very much temporary in nature
I see. Thanks for the reference.
> (see the use case stated in the starting > thread).
Yes, I understand the use case. I am just not convinced that a persistent stash would be detrimental, but I also do not care deeply.
Show 15 quoted lines
>> it were true that if I were to create a stash today, and then be surprised 30
>> days from now when I do a 'stash list' and find the stash is still there.
>> Something along the lines of:
>>
>> $ git stash save my work
>> # wait 30 days
>> $ git stash list
>> stash@{0}: WIP on master: my work
>>
>> # and if my reaction were something like:
>> # hmm, that's strange, what is that stash still doing there? It's been 30 days,
>> # it should be gone.
>
> We could prune before running "git stash list", but why bother? The fact
> you can see it is like a bonus.hmph :)
-brandon