2

I have a bunch of files in Git, using Git Annex (which basically replaces all the files with symlinks and lets you only get the content when you need it).

I populated a repo with some files on one machine, and I'm trying to sync them over to a different machine, running Ubuntu 12.04 with home directory encryption.

When I run git annex sync I get errors like this:

error: unable to create symlink path/to/really_long_filename_that_is_too_long_for_encfs_or_whatever_ubuntu_is_using_on_this_filesystem.drat: File name too long

The sync understandably fails, because it can't create all the files that are supposed to be there.

Obviously I need to rename the long-named files to shorter names. But git mv doesn't work, presumably because the file couldn't be checked out:

fatal: bad source, source=path/to/really_long_filename_that_is_too_long_for_encfs_or_whatever_ubuntu_is_using_on_this_filesystem.drat, destination=short.name

How do I create a commit to change the name of a file that can't be checked out under its current name?

Note: Answers that consist of "check it out on a different filesystem or machine" aren't what I'm looking for and won't be accepted. I know I can rename the files if I move the repo onto an unencrypted mount or just go back to the machine I added the files on. I want to know how I can deal with this problem without moving the whole repo to a different filesystem.

interfect
  • 2,665
  • 1
  • 20
  • 35

0 Answers0