ProjectBorealis / UEGitPlugin

Unreal Engine Git Source Control Plugin (refactored)
MIT License
512 stars 104 forks source link

CheckLFSLockable() reports explicitly not lockable files as lockable #180

Closed CdrJamison closed 2 months ago

CdrJamison commented 2 months ago

CheckLFSLockable() returns the wrong value when checking the results from check-attr when files are explicitly marked as not lockable.

There are three possible returns for a line from the check-attr call: <Filename>: Lockable: [unspecified|set|unset]

Unfortunately, the function decides if the file is lockable by checking to see if the last three letters of the returned value are set, which also happens to be the last three letters of unset. Mostly it gets away with it because the default (not lockable) reports unspecified rather than unset, and it's rare to explicitly set a file to what's the default anyway.

It's a simple fix and I'll hopefully have a PR shortly.

CdrJamison commented 2 months ago

Created PR https://github.com/ProjectBorealis/UEGitPlugin/pull/181