git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@ubuntu.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: stash refuses to pop
Date: Tue, 10 Apr 2012 14:56:59 -0400	[thread overview]
Message-ID: <4F84827B.80104@ubuntu.com> (raw)
In-Reply-To: <7vpqbfpim2.fsf@alter.siamese.dyndns.org>

On 4/10/2012 2:05 PM, Junio C Hamano wrote:
> Phillip Susi<psusi@ubuntu.com>  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...

> I do not use "stash -p" and personally, but I think its broken from the UI
> point of view.  The point of "stash" is to clear your workspace to a
> pristine state, do random things, and after you are done and cleared your
> workspace again, apply it to come back to the original state or a state as
> if you started your WIP from the updated clean-slate.

Or temporarily undo some changes and come back to those changes later?

> So probably the right way to use "stash -p" (if there were such a thing)
> would be to stash away the remainder in a separate stash with another
> "stash" without "-p" (which will clear your workspace to a pristine state)
> and then pop the one you created with "stash -p", I think.

That would not get you back to the state you were in when you first 
stashed, but instead to a state where you have the first set of changes, 
but not the second ( which you then also can not pop due to the first 
changes being there ).

  reply	other threads:[~2012-04-10 18:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 17:52 stash refuses to pop Phillip Susi
2012-04-10 18:05 ` Junio C Hamano
2012-04-10 18:56   ` Phillip Susi [this message]
2012-04-11  2:47     ` Andrew Ardill
2012-04-11  2:59       ` Phillip Susi
2012-04-14  4:27         ` Andreas Krey
2012-04-14 10:12           ` Jakub Narebski
2012-04-16  1:29           ` Phillip Susi
2012-04-11  7:15       ` Victor Engmark
2012-04-11  5:58     ` Johannes Sixt
2012-04-11 14:21       ` Phillip Susi
2012-04-12  5:50         ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F84827B.80104@ubuntu.com \
    --to=psusi@ubuntu.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).