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

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

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> 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 commit

and 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 --amend

would 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.



--
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