Re: stash refuses to pop
- From
- Phillip 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-----