Skip to content

LFS does not use a SUBSTed Path in every place #4238

Closed
@rhoellwarthwork

Description

@rhoellwarthwork

I'm using git lfs as Part of the git for Windows Installation v 2.27.0. It's git lfs 2.11 - see below the output of git lfs env for details.

Im using the dos SUBST command to redirect a subdirectory to the driveletter D:. Today I cloned an empty repository and wanted to track "*.docx" files and got the following error:

/d/repos/PROD/TEST/test.push_test_wg_git_lfs (master)
$ git lfs track "*.docx"
Current directory "D:\repos\PROD\TEST\test.push_test_wg_git_lfs" outside of git working directory "C:\Users\Public\Documents\subst_D\repos\PROD\TEST\test.push_test_wg_git_lfs".

I cd'ed to the "real" directory and repeated the command successfully. After that cd'ed back to the D:-version of the folder an could work with lfs flawlessly. (git add, git commit, git push - all worked like expected).

When I do a git lfs env I see that all directorys are located on the D:-Drive. Only the LocalWorkingDir is located on C:

$ git lfs env
git-lfs/2.11.0 (GitHub; windows amd64; go 1.14.2; git 48b28d9)
git version 2.27.0.windows.1

Endpoint=https://xxxxxxx/test/test.push_test_wg_git_lfs.git/info/lfs (auth=none)
SSH=git@xxxxxxx:test/test.push_test_wg_git_lfs.git
LocalWorkingDir=C:\Users\Public\Documents\subst_D\repos\PROD\TEST\test.push_test_wg_git_lfs
LocalGitDir=D:\repos\PROD\TEST\test.push_test_wg_git_lfs.git
LocalGitStorageDir=D:\repos\PROD\TEST\test.push_test_wg_git_lfs.git
LocalMediaDir=D:\repos\PROD\TEST\test.push_test_wg_git_lfs.git\lfs\objects
LocalReferenceDirs=
TempDir=D:\repos\PROD\TEST\test.push_test_wg_git_lfs.git\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=D:\repos\PROD\TEST\test.push_test_wg_git_lfs.git\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_SSH=C:\Program Files (x86)\WinSSHTerm\tools\plink.exe
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"

My OS is Windows 10 1709 (Build 16299.2045). I tested it also on Win 10 1909 (Build 18363.1016) - same error.

I don't think this is an intended behavior. At least it is not the behavior I did expect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions