Re: [PATCH 2/2] git-gc: skip stashes when expiring reflogs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 17, 2008, 21:54 UTC
- Message-ID
- <7vej6v683q.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.DEB.1.00.0806171000400.6439@racer>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 9 quoted lines
> On Mon, 16 Jun 2008, Junio C Hamano wrote: > ... > Isn't this overkill? I mean, we could just change git-stash to output a > warning: > > Note: your changes have been stored temporarily. If you need to > keep them permanently, consider putting them into a branch: > > git branch stashed-longer stash
You are asking the question to a Wrong Person, as I never asked to have a nonexpirable stash, but I would hate such a change to waste four lines of my terminal every time I create a new stash.
Also making a "branch" in the "git branch" sense (iow, a local branch you can build on top of) is not something you would want anyway, isn't it? What is the workflow to resume working from there?
$ git checkout stashed-longer
$ git reset --soft HEAD^
$ work more
$ git commitand losing the tip with "reset --soft" would be crucial. Otherwise if you make commits on top of it by mistake, you will have a funny merge in the history behind that commit. IOW
$ git checkout stashed-longer
$ work more
$ git commit --amendwould not work.
Of course,
$ git stash apply stashed-longer
would work but that is by accident, as at that point what you are feeding "git stash" command is not really a name of a ref that is a stash.