This project is read-only.

"git tf checkin" fails because of too long files names.

Nov 15, 2013 at 2:02 PM
Hi guys,

I'm trying to use git-tf right now. Seems to work nice except for an error raised when running the "git tf checkin" command:
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Unfortunately, our rather big codebase with lots of lengthy namespaces is reaching very close to the available 248/260 character limit with TFS alone. So much that we have to map the source to a location with only a max. 5 letter directory.
I'm not in the position to change legacy code to fix this in TFS itself but would still like to use git-tf.

If i'm not totally wrong, it seems git-tf creates a temporary workspace in <repositor path>/.git/tf/<some GUID> or maybe some other location.
This will fail because the file path length limit will then be exceeded.

I was hoping to find some configuration option in git-tf that will allow me to specify the location of the temp workspace but i didn't see any.

I'm not a Java programmer at all but I tried to identify the required code changes to allow costomization of the location of temp workspace in git-tf on my own.

After installing Eclipse and Maven I was able to compile it but I had no-luck so far to make those changes. Honestly, I found the code rather confusing because the temp dir is validated and created all over the place (and there seems to different ones).

I would be very glad if someone can give me a confirmation that either my current assumptions are correct or give me a good hint on which changes would be required in the code to solve my problem.

Nov 15, 2013 at 2:09 PM
If you set the git-tf.tempdir configuration value in your repository, git-tf will use that for building temporary TFS workspaces. Eg:
git config git-tf.tempdir c:/temp/foo
Nov 15, 2013 at 2:53 PM

Also please note by that that the path to the temporary workspace will be 10 characters longer, e.g. c:/temp/foo/tf/a791012

Nov 15, 2013 at 3:06 PM

Could you please provide us with a bit more details?
  • What version of TFS server do you use?
  • What operating system do you use on the client?
Nov 15, 2013 at 4:03 PM
Edited Nov 15, 2013 at 4:03 PM

we are using TFS 2012, Visual Studio 2012 and Windows 7 Enterprise.
I will try
git config git-tf.tempdir c:/temp/foo
tommorrow - looks like what i have been looking for.
Nov 18, 2013 at 1:39 PM
That did it. Thanks!

Was that documented somewhere and I wasn't able to find it or is it not documented?
Nov 18, 2013 at 3:13 PM
Edited Nov 18, 2013 at 3:13 PM
Now I got some more problems after adding the .gitignore file and performing a checkin.
I will create a new thread