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

git stash pop not reapplying deletions

From
SFSteve Folly <steve@spfweb.co.uk>
Date
Feb 14, 2010, 19:45 UTC
Message-ID
<loom.20100214T200110-615@post.gmane.org>
Hi,

I'm not sure if I've found a bug in 'git stash' or if I'm using it the wrong way? (This is with git 1.6.6):

$ git init stashtest $ cd stashtest $ mkdir dira $ touch dira/a dira/b dira/c $ git stage dira $ git commit -m "added dira" $ git mv dira dirb $ git status # correctly shows renames

# On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # renamed: dira/a -> dirb/a # renamed: dira/b -> dirb/b # renamed: dira/c -> dirb/c #

$ git stash $ git stash pop

# On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: dirb/a # new file: dirb/b # new file: dirb/c # # Changed but not updated: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # deleted: dira/a # deleted: dira/b # deleted: dira/c # Dropped refs/stash@{0} (cf9efdede3a3ee8e078192b574520fd2ed7f3d9b)

It's added the new files in dirb but hasn't deleted the old files in dira. Is this right?

Regards, Steve

Next: Thomas Rast
Message 1 of 8 in “git stash pop not reapplying deletions”
  1. Steve FollyFeb 14, 2010
  2. Thomas RastFeb 14, 2010
  3. Steve FollyFeb 15, 2010
  4. Thomas RastFeb 15, 2010
  5. stash pop: remove 'apply' options during 'drop' invocationThomas Rast, Feb 15, 2010
  6. Stephen BoydFeb 15, 2010
  7. Steve FollyFeb 15, 2010
  8. Junio C HamanoFeb 16, 2010

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.