git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: stash refuses to pop

From
PSPhillip Susi <psusi@ubuntu.com>
Date
Apr 10, 2012, 18:56 UTC
Message-ID
<4F84827B.80104@ubuntu.com>
In-Reply-To
<7vpqbfpim2.fsf@alter.siamese.dyndns.org>
On 4/10/2012 2:05 PM, Junio C Hamano wrote:
Show 8 quoted lines
> 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...

Show 5 quoted lines
> 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 ).

Previous: Junio C HamanoNext: Andrew Ardill
Message 3 of 12 in “stash refuses to pop”
  1. Phillip SusiApr 10, 2012
  2. Junio C HamanoApr 10, 2012
  3. Phillip SusiApr 10, 2012
  4. Andrew ArdillApr 11, 2012
  5. Phillip SusiApr 11, 2012
  6. Andreas KreyApr 14, 2012
  7. Jakub NarebskiApr 14, 2012
  8. Phillip SusiApr 16, 2012
  9. Victor EngmarkApr 11, 2012
  10. Johannes SixtApr 11, 2012
  11. Phillip SusiApr 11, 2012
  12. Johannes SixtApr 12, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.