SRombauts / UEGitPlugin

Unreal Engine 5 Git LFS 2 Source Control Plugin (beta)
http://srombauts.github.io/UEGitPlugin
MIT License
811 stars 165 forks source link

Git plugin not working with `git worktree` #76

Closed DJm00n closed 6 years ago

DJm00n commented 6 years ago

Plugin checks for .git directory but git worktree creating .git file instead (with actual gitdir path in it). Check here must also consider .git file: https://github.com/SRombauts/UE4GitPlugin/blob/047e7c8baebbc7c6d251b4c72a90321f18791394/Source/GitSourceControl/Private/GitSourceControlUtils.cpp#L340 Quickfix:

-               bFound = IFileManager::Get().DirectoryExists(*PathToGitSubdirectory);
+               bFound = IFileManager::Get().DirectoryExists(*PathToGitSubdirectory) || IFileManager::Get().FileExists(*PathToGitSubdirectory);
SRombauts commented 6 years ago

Thanks for reporting this, and for providing a quick fix!