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 11, 2012, 02:59 UTC
Message-ID
<4F84F39B.6070907@ubuntu.com>
In-Reply-To
<CAH5451=0KvUPB77hKyjFVXRwPfEZ8+45b20SimBPmuF-gq_A3w@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/10/2012 10:47 PM, Andrew Ardill wrote:
Show 5 quoted lines
> The first question, it would seem, is what should git do when there
> are modified files present, and the user tries to pop a stash which
> touches those files. The current behaviour is to reject the pop,
> reasonable enough, though for what exact reason I am not sure
> (potential merge issues, I assume).
Since pop is the inverse of push, and merge is the inverse of a partial push, I would expect pop to perform a merge.
Show 5 quoted lines
> The method you have described is just one way of coming on this
> situation. The user could have
> * stashed their work, modified some files and tried to pop
> * partially stashed their work, and tried to pop
> * partially stashed their work, modified some files and then tried to pop.
Yes, there are a number of ways you can get to the situation where you can not pop the stash.  How to resolve this is unclear from the results of the failed pop.  I finally ended up resolving it by committing the remaining changes, then popping the stash ( which performed the merge successfully ), and finally doing a git reset HEAD~1 to remove the temporary commit, but preserve the merged results.  This seemed like a good deal of unnecessary trouble.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPhPObAAoJEJrBOlT6nu75qwkH/jlWpu+yRIx9l8qsp4+MWB/I FPfKku+LnUpRoegsmKMer1J59kriw8zJF8hujHUUp1RcCdfQBUJwCDZnNGEa/LRn PNrceRHc3V92ImBBJHwLsOqr4IQa7O+PDG8Tuht6q6NwIxEu2ZycoxnThx7JoF/G wsD5KA9yZmJKb+lptCNVVfgez4k6ESqnekx4Tsl8C5UOUXbra61SC6vG+igRnU2P 6V+QaYbHEmNNq3pLmebCty/wmzwHJc9oTA+wDawJwV5BhcgsKnUY0RhVMT86t1Qu IbwqkFUJV9je1GZKEwklvbLnBx2js80yvEnPWpC3jt9j6gxRGAfaq/5NQnl7vQE= =UEM3 -----END PGP SIGNATURE-----

Previous: Andrew ArdillNext: Andreas Krey
Message 5 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.