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

git-svn failure when symlink added in svn

From
Seth Falcon <sethfalcon@gmail.com>
Date
Apr 14, 2007, 06:41 UTC
Message-ID
<m2647zh2zc.fsf@gmail.com>
Hi,

A few weeks ago I reported a symlink related error with git-svn and I've now had a chance to track down a few more details. The trigger seems to be if a file is removed from svn and then later added as a symlink. The error I get is:

  error: git-checkout-index: unable to create symlink foo.txt (Invalid argument)

This is from the call to symlink(new, path) in entry.c and it seems that new is ''.

Here is a recipe to reproduce:
## First create an svn repository
  svnadmin create SVN123-repos
  svn co file:///Users/seth/temp/SVN123-repos SVN123
  cd SVN123
  echo 123 > foo.txt
  svn add foo.txt 
  svn ci -m "add a file"
## Now mirror using git-svn
  cd ..
  mkdir GIT123
  cd GIT123/
  git svn init file:///Users/seth/temp/SVN123-repos
  git svn fetch
## Next remove and add a file as a symlink
  cd ..
  cd SVN123
  echo 123 > bar.txt
  svn add bar.txt 
  svn ci -m"add bar"
  svn rm foo.txt 
  svn ci -m "remove foo"
  ln -s bar.txt foo.txt
  svn add foo.txt 
  svn ci -m"add foo as symlink"
## Finally, try to rebase
  cd ../GIT123/
  git svn rebase

git version 1.5.1.53.g77e6f svn 1.4.0

+ seth
Next: Eric Wong
Message 1 of 24 in “git-svn failure when symlink added in svn”
  1. Seth FalconApr 14, 2007
  2. Eric WongApr 14, 2007
  3. Seth FalconApr 16, 2007
  4. Alexander KlinkApr 26, 2007
  5. Linus TorvaldsApr 27, 2007
  6. Alexander KlinkApr 28, 2007
  7. Seth FalconApr 28, 2007
  8. Junio C HamanoApr 28, 2007
  9. Seth FalconApr 28, 2007
  10. Junio C HamanoApr 28, 2007
  11. Seth FalconApr 28, 2007
  12. Junio C HamanoApr 28, 2007
  13. Eric WongApr 29, 2007
  14. Junio C HamanoApr 29, 2007
  15. Eric WongApr 29, 2007
  16. Alexander KlinkApr 30, 2007
  17. Junio C HamanoApr 30, 2007
  18. Eric WongApr 30, 2007
  19. Seth FalconApr 30, 2007
  20. Alexander KlinkMay 1, 2007
  21. Eric WongApr 29, 2007
  22. Seth FalconApr 30, 2007
  23. Eric WongApr 30, 2007
  24. Seth FalconMay 1, 2007

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.