git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Alexander Gladysh <agladysh@gmail.com>
Date
Oct 27, 2013, 10:08 UTC
Message-ID
<CABZR_7BjHu7epdYhZeeLXPV=xk01MU_aM4dFuWynQHLOu1Q3OQ@mail.gmail.com>
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
Message 1 of 1 in “git stash does not work when directory is replaced by a symlink to itself”
  1. Alexander GladyshOct 27, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.