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.
CheckLFSLockable()
returns the wrong value when checking the results fromcheck-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 ofunset
. Mostly it gets away with it because the default (not lockable) reportsunspecified
rather thanunset
, 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.