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

Re: stash refuses to pop

From
Andreas Krey <a.krey@gmx.de>
Date
Apr 14, 2012, 04:27 UTC
Message-ID
<20120414042713.GA13889@inner.h.iocl.org>
In-Reply-To
<4F84F39B.6070907@ubuntu.com>

On Tue, 10 Apr 2012 22:59:39 +0000, Phillip Susi wrote: ...

> 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.

(Late to the game.) Actually, this is exactly what I would have proposed to do. Git is a bit shy on performing a merge into a locally modified file. I assumed so far that is because there is no way of aborting such a merge (resetting to the state of local modifications before the attempt). With the temporary commit you have a way of retrying the pop merge if you lost your way in it.

And I think that is a good idea; I never liked the way in which a cvs/svn update merged into locally modified files without a way to undo, and thus forcing you to clean up the potential mess manually. (Ok, they leave the old files lying arond, but that doesn't help rewinding the state.)

Andreas
-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800
Previous: Phillip SusiNext: Jakub Narebski
Message 6 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.