From: Vovan-VE <vovan-ve@yandex.ru>
To: git@vger.kernel.org
Subject: [BUG] git-stash confused when directory replaced with symlink
Date: Mon, 10 Feb 2014 19:54:53 +0900 [thread overview]
Message-ID: <op.xa2a9r00tcop7l@dev-server> (raw)
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
reply other threads:[~2014-02-10 11:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=op.xa2a9r00tcop7l@dev-server \
--to=vovan-ve@yandex.ru \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.