1

We are using TFVC server workspace repository and there is a problem with too long file names, which causes the conversion to abort:"The following path contains more than the allowed 259 characters". The mentioned folder was a renamed one. Can I somehow exclude this folder? tfignore does only work on local workspace? I also want to clone the repository to git with its history.

I tried to check out to a previous changeset, but somehow I still received the error.

If anyone has a way to circumvent this problem I would be happy to hear about it. I could create a branch of the problematic folder etc.

Philippe
  • 28,207
  • 6
  • 54
  • 78
Patrick
  • 907
  • 9
  • 22
  • I try to get to a previous changeset: git tfs clone. The error appears in changeset 701861. I am wondering why it does even go so far: -c701855 https://myAzure.de/tfs/DefaultCollection $/TFVC_Repo/Main . --branches=all --debug --resumable – Patrick Dec 06 '22 at 07:42
  • Git itself does not have a 259 character limit, so whatever this is, it's not Git doing it. – torek Dec 06 '22 at 08:52

1 Answers1

0

In the command line, when you clone, you could specify a folder that will be used to map the tfvc workspace with the option --workspace to handle this specific use case.

And in your case, you have interest to specify the shortest path possible. Something like --workspace=c:\w

See https://github.com/git-tfs/git-tfs/blob/master/doc/commands/clone.md

Or maybe git-tfs already supports long paths but it needs to be enabled in the operating system https://github.com/git-tfs/git-tfs/pull/1221

See also this documentation https://github.com/git-tfs/git-tfs/blob/master/doc/Set-custom-workspace.md

If your repository already exists maybe running the following git command inside it is your best option:

 git config git-tfs.workspace-dir c:\w
Philippe
  • 28,207
  • 6
  • 54
  • 78