{"thread":{"id":"19190","subject":"Bug with mv + stash?","startedAt":"2009-05-05T18:47:22Z","lastAt":"2009-05-05T18:47:22Z","messageCount":1,"participants":["Quin Hoxie"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"113050","messageId":"6e699a4d0905051147m5c495d5erdb608203d0aa69be@mail.gmail.com","threadId":"19190","inReplyTo":null,"subject":"Bug with mv + stash?","fromName":"Quin Hoxie","fromEmail":"qhoxie@gmail.com","sentAt":"2009-05-05T18:47:22Z","receivedAt":"2009-05-05T18:47:22Z","isPatch":false,"sender":{"key":"qhoxie@gmail.com","avatar":null},"body":"This may or may not be considered a bug, given the empty file, but I\nthought it would be prudent to report it just in case.\nWhen moving/renaming a tracked file, and then creating a new file with\nthe original name, stash loses/deletes the new file.\nBelow is the full transaction to reproduce the behavior.\n\n--\nQuin Hoxie\n\n\n[quin@qmbp /tmp] $ mkdir repo\n[quin@qmbp /tmp] $ cd repo\n[quin@qmbp /tmp/repo] $ git init\nInitialized empty Git repository in /private/tmp/repo/.git/\n[quin@qmbp /tmp/repo] $ echo \"hello world\" > foo\n[quin@qmbp /tmp/repo] $ git add foo\n[quin@qmbp /tmp/repo] $ git commit -m \"added foo\"\n[master (root-commit)]: created 9ed55f1: \"added foo\"\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 foo\n[quin@qmbp /tmp/repo] $ git mv foo bar\n[quin@qmbp /tmp/repo] $ git status\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#       renamed:    foo -> bar\n#\n[quin@qmbp /tmp/repo] $ touch foo\n[quin@qmbp /tmp/repo] $ git status\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#       renamed:    foo -> bar\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#       foo\n[quin@qmbp /tmp/repo] $ git stash\nSaved working directory and index state \"WIP on master: 9ed55f1... added foo\"\nHEAD is now at 9ed55f1 added foo\n(To restore them type \"git stash apply\")\n[quin@qmbp /tmp/repo] $ git stash apply\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#       new file:   bar\n#\n# Changed but not updated:\n#   (use \"git add/rm <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n#\n#       deleted:    foo\n#\n[quin@qmbp /tmp/repo] $ ls\nbar\n[quin@qmbp /tmp/repo] $\n"}]}