Thread (7 messages) flat view 7 messages, 6 authors, 2016-06-15

Re: [PATCH 2/2] git-gc: skip stashes when expiring reflogs

From: Wincent Colaiuta <hidden>
Date: 2016-06-15 22:44:44

El 13/6/2008, a las 11:47, Junio C Hamano escribió:
If there is a strong correlation between the two, one possible  
solution
would be to introduce refs/stashes/$branch/ namespace that holds each
stash as an individual, numbered ref under it.  They will live forever
until the user explicitly asks for their removal.  If we go this  
route, we
would need a few niceties such as a way to move a "quick stash" that  
is
represented as a reflog entry into a "longlived stash" that is  
represented
as an individual ref under refs/stashes/$branch/.

But let's not talk nor think about per-branch stash for now.  How  
does the
"keep" thing sound to people?

Sounds a little bit over-engineered to me.

So, "stash" is intended for short-term storage, but by adding a "keep"  
option you're officially blessing it for long-term storage as well.  
And the interface that you propose, explicitly marking stuff as "for  
keeps" and being able to move stuff from "temp" to "keep" sounds quite  
complicated.

I honestly think that the simplest solution from both an  
implementation and a usage perspective is just to keep everything that  
is stashed until the user clears it out. If you use a push/pop model  
then your stash will never get cluttered up with garbage, and if you  
do abuse it for long-term storage you'll start to notice that the  
stash list is inconveniently large, thus hinting that perhaps you are  
abusing stash in ways that the designers never intended.

Cheers,
Wincent
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help