Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git lfs env: invalid output in repo located on disk mounted to ntfs folder on windows #4333

Closed
pbrimmers-isra opened this issue Dec 3, 2020 · 1 comment

Comments

@pbrimmers-isra
Copy link

Describe the bug
Running git lfs env shows Error: error converting ".git" to absolute: EvalSymlinks: too many links and path e.g. for LocalWorkingDir is empty. See output below.
lfs and hooks directory are placed in working directory for git lfs command, cause paths are not correctly set.

To Reproduce
Steps to reproduce the behavior:

  1. Add additional drive to PC (e.g. hard disk or usb stick)
  2. Go to Control Panel -> Administrative Tools -> Computer Management -> Disk Management
  3. Right click on additional drive and select "Change Drive Letter and Paths..."
  4. Click "Add.." and mount to an empty folder (e.g. "C:\UsbStick"), called in the following steps
  5. Remove the existing mount to drive letter. So only mount to and not to a drive letter.
  6. Go to and create folder "test_repo"
  7. Run git init in "test_repo"
  8. Run git lfs env in "test_repo"

Expected behavior
No error message, all paths are correctly set

System environment
Observed on Windows 7 and Windows 10

Output of git lfs env

git-lfs/2.12.1 (GitHub; windows amd64; go 1.14.10; git 85b28e06)
git version 2.29.2.windows.2

Error: error converting ".git" to absolute: EvalSymlinks: too many links
LocalWorkingDir=
LocalGitDir=
LocalGitStorageDir=
LocalMediaDir=lfs\objects
LocalReferenceDirs=
TempDir=lfs\tmp
ConcurrentTransfers=8
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic,lfs-standalone-file
UploadTransfers=basic,lfs-standalone-file
GIT_EXEC_PATH=C:/Program Files/Git/mingw64/libexec/git-core
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"

Additional context
Output of git rev-parse --git-dir --show-toplevel:

.git
C:/USBStick/test_repo

If I go into a subfolder of the repo error changes to Error: error converting "C:\\USBStick\\test_repo\\.git" to absolute: EvalSymlinks: too many links
Output of git rev-parse --git-dir --show-toplevel in subfolder:

C:/USBStick/test_repo/.git
C:/USBStick/test_repo
@bk2204
Copy link
Member

bk2204 commented Dec 3, 2020

Hey,

Thanks for reporting. This is another instance of #4012, which is, in the general case, about the fact that paths aren't properly canonicalized by the built-in Go functions on Windows. We're tracking that there and I'm (slowly) working on a patch to Git that should help with this. In the mean time, I would either access this data using WSL and a Linux version of Git LFS or I'd avoid this type of mounting altogether.

I'm going to close this in favor of #4012, since this is essentially going to be fixed by the same approach.

@bk2204 bk2204 closed this as completed Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants