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

bug: git-stash save and symbolic links

From
Simon Strandgaard <neoneye@gmail.com>
Date
Oct 20, 2008, 08:34 UTC
Message-ID
<df1390cc0810200134x68a8eb1fyc7f24650c8c9c5d3@mail.gmail.com>

git-stash cannot find the repository when the path is a symbolic link. solution for me was to cd to the absolute path and then do git-stash.

FAILURE: git-stash with symbolic link.

prompt> pwd /Users/neoneye/st prompt> ls -la ~/st lrwxr-xr-x 1 neoneye neoneye 38 10 Okt 07:40 /Users/neoneye/st -> /Users/neoneye/git/code/source_toolbox prompt> git-stash fatal: Not a git repository fatal: Not a git repository fatal: Not a git repository You do not have the initial commit yet prompt>

SUCCESS: git-stash without symbolic link.

prompt> pwd /Users/neoneye/git/code prompt> ls -la drwxr-xr-x 16 neoneye neoneye 544 20 Okt 10:18 .git drwxr-xr-x 29 neoneye neoneye 986 16 Okt 13:04 source_toolbox prompt> git stash save "did I mess up" Saved working directory and index state "On master: did I mess up" HEAD is now at 90ac45d we can now seek through a WAV file.. finally. prompt>

I think the problem is located in the save_stash() function, but im not good at sh scripting to make a patch.

Thank you very much for git!
-- 
Simon Strandgaard
http://toolboxapp.com/
Next: Jeff King
Message 1 of 5 in “bug: git-stash save and symbolic links”
  1. Simon StrandgaardOct 20, 2008
  2. Jeff KingOct 20, 2008
  3. Simon StrandgaardOct 20, 2008
  4. Simon StrandgaardOct 20, 2008
  5. Jeff KingOct 20, 2008

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.