Closed CraftedCart closed 6 years ago
Thanks for this @CraftedCart.
The lock command is working on my Windows install, so it looks like a difference of implementation under Linux.
I didn't know of this "-C" command line flag, perhaps was it not present under git 1.9.x when I started this Git Plugin...
This option appeared in git 1.8.5 (Q4 2013, see RelNotes):
Just like "make -C
", "git -C ..." tells Git to go there before doing anything else.
So I can safely assume that anyone using the Git plugin should now have a more recent Git version (which was still quite new when I started).
Hum, the fact is that FLinuxPlatformProcess::CreateProc() does not use the OptionalWorkingDirectory!
Ok, so I will merge your patch "as-is". I will refactor and re-test it properly later when I have more time.
Thanks again!
When locking a file (At least on Linux), it would fail with the following message in the log
git lfs
will error with that message if the current working directory is not within the git directory. For whatever reason passing the directory asOptionalWorkingDirectory
inCreateProc
doesn't seem to work.So I modified the
git
command to take the git directory with the-C
argument. Now when locking a file, the plugin will build a command like `git -C "/home/user/Unreal Projects/AwesomeProject lfs lock path/to/file.uasset".