* [BUG] git-stash confused when directory replaced with symlink
@ 2014-02-10 10:54 Vovan-VE
0 siblings, 0 replies; only message in thread
From: Vovan-VE @ 2014-02-10 10:54 UTC (permalink / raw)
To: git
Hello!
Looks like a bug. `git stash` fails with fatal error, when whole
subdirectory is replaced with a symlink.
I'm using latest Git/1.8.5.4 under Ubuntu 12.04.4 x64.
Steps to reproduce initial state:
$ git init
$ mkdir dir
$ touch dir/file.txt
$ git add dir/file.txt
$ git commit -m 'Initial commit'
$ rm -r dir
$ ln -s -T /something/does/not/matter dir
$ git status
# Changes not staged for commit:
#
# deleted: dir/file.txt
#
# Untracked files:
#
# dir
Now the bug itself:
$ git stash
error: 'dir/file.txt' is beyond a symbolic link
fatal: Unable to process path dir/file.txt
Cannot save the current worktree state
Target of the symlink doesn't matter, as far as I understand.
Doing `git add --all` or `git rm --cached dir/file.txt` doesn't change the
result - still fatal.
Git tries to delete file "dir/file.txt", which does not exist. It confused
by existing "dir".
However `git checkout .` works fine: symlink deleted, directory restored.
--
Vovan-VE
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-10 11:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 10:54 [BUG] git-stash confused when directory replaced with symlink Vovan-VE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).