threads / discuss / 35215

git stash does not work when directory is replaced by a symlink to itself

Subject: git stash does not work when directory is replaced by a symlink to itself

## tl;dr

One message between Oct 27, 2013 and Oct 27, 2013.

replies: 0people: 1as markdown or json

Alexander Gladysh· Oct 27, 2013, 10:08 UTC · lore
Hi, list!
See below.

Best, Alexander.

agladysh@work-1:~/tmp/git$ git --version git version 1.8.4.1

agladysh@work-1:~/tmp/git$ cat ./test.sh #!/bin/bash

set -e

mkdir alpha cd alpha git init

mkdir beta echo "gamma" > beta/gamma git add beta/gamma git commit -m "initial commit"

mv beta delta ln -s delta beta git stash

agladysh@work-1:~/tmp/git$ ./test.sh
Initialized empty Git repository in /home/agladysh/tmp/git/alpha/.git/
[master (root-commit) 9c6138f] initial commit
 1 file changed, 1 insertion(+)
 create mode 100644 beta/gamma
error: 'beta/gamma' is beyond a symbolic link
fatal: Unable to process path beta/gamma
Cannot save the current worktree state
agladysh@work-1:~/tmp/git$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.10
Release: 12.10
Codename: quantal
agladysh@work-1:~/tmp/git$ uname -a
Linux work-1 3.5.0-34-generic #55-Ubuntu SMP Thu Jun 6 20:18:19 UTC
2013 x86_64 x86_64 x86_64 GNU/Linux

← back to recent threads