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

From: Jakub Narebski <[email-masked]>
Date: Fri, 13 Jun 2008 01:51:28 -0700 (PDT)

Jeff King <[email-masked]> writes:

> So of course my first question is "then why didn't you use a branch?" :)
> 
> I'm not, by the way, trying to say "there is no good reason not to use a
> branch." I am trying to figure out what the reasons are, because I
> wonder if there is a more useful abstraction we can come up for handling
> this situation.
> 
> Reading your (and others') responses, it seems like there are two
> things:
> 
>   1. Stashing is about saying "save everything about where I am now with
>      no hassle". IOW, it's one command, you don't have to decide what
>      goes and what stays, and you can pull it back out with one command.
>      And maybe there is a psychological component that you are not ready
>      to "commit" such a work-in-progress (I am extrapolating here, but I
>      know that when I first started with git, I was hesitant to commit
>      because of my experience with other systems).
[...]

There is one thing that is easy to do with a stash (due to the way it
is implemented, even if it complicates it a bit), and you CANNOT do
(without much hassle) with branches, namely saving state where _index_
state matters, either partial commit (or just added files), or
conflict resolve in progress.

I'm not sure how useful such a thing can be after a month, but if
project has slow rate of development (and developer can deal with such
"ahlfway" state decently when restored), it can happen...

-- 
Jakub Narebski
Poland
ShadeHawk on #git