Re: stash refuses to pop

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

 



Am 4/10/2012 20:56, schrieb Phillip Susi:
> On 4/10/2012 2:05 PM, Junio C Hamano wrote:
>> Phillip Susi<psusi@xxxxxxxxxx>  writes:
>>
>>> git stash refuses to apply a stash if it touches files that are
>>> modified.  Using stash -p to selectively stash some hunks of a file
>>> and then immediately trying to pop that stash causes this failure
>>> every time.
>>
>> I think that is by design.
> 
> Being able to push something that you can not pop seems to be broken
> design...

You are trying to abuse git-stash, but it does not cooperate because it
was not designed to be abused ;-) git-stash is not intended as a generic
push-and-pop-my-changes work horse.

The purpose of git-stash is that you can "move away"

- all of your changes to have a clean worktree or
- part of your changes to _create a clean worktree from the remaining
changes_.

That is, before you can think of applying a stash, you are expected to
have cleaned out your worktree.

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