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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux