{"thread":{"id":"35840","subject":"[BUG] git-stash confused when directory replaced with symlink","startedAt":"2014-02-10T10:54:53Z","lastAt":"2014-02-10T10:54:53Z","messageCount":1,"participants":["Vovan-VE"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"234577","messageId":"op.xa2a9r00tcop7l@dev-server","threadId":"35840","inReplyTo":null,"subject":"[BUG] git-stash confused when directory replaced with symlink","fromName":"Vovan-VE","fromEmail":"vovan-ve@yandex.ru","sentAt":"2014-02-10T10:54:53Z","receivedAt":"2014-02-10T10:54:53Z","isPatch":false,"sender":{"key":"vovan-ve@yandex.ru","avatar":null},"body":"Hello!\n\nLooks like a bug. `git stash` fails with fatal error, when whole  \nsubdirectory is replaced with a symlink.\n\nI'm using latest Git/1.8.5.4 under Ubuntu 12.04.4 x64.\n\nSteps to reproduce initial state:\n\n     $ git init\n     $ mkdir dir\n     $ touch dir/file.txt\n     $ git add dir/file.txt\n     $ git commit -m 'Initial commit'\n\n     $ rm -r dir\n     $ ln -s -T /something/does/not/matter dir\n     $ git status\n     # Changes not staged for commit:\n     #\n     #\tdeleted:    dir/file.txt\n     #\n     # Untracked files:\n     #\n     #\tdir\n\nNow the bug itself:\n\n     $ git stash\n     error: 'dir/file.txt' is beyond a symbolic link\n     fatal: Unable to process path dir/file.txt\n     Cannot save the current worktree state\n\nTarget of the symlink doesn't matter, as far as I understand.\nDoing `git add --all` or `git rm --cached dir/file.txt` doesn't change the  \nresult - still fatal.\n\nGit tries to delete file \"dir/file.txt\", which does not exist. It confused  \nby existing \"dir\".\n\nHowever `git checkout .` works fine: symlink deleted, directory restored.\n\n-- \nVovan-VE\n"}]}