git-lfs/locking
brian m. carlson 4dc476f286
locking: don't assume files are lockable if no patterns exist
Whenever we use a file path filter and there are no included patterns,
we default to assuming the files match.  For many cases, this is fine,
but this is not useful for checking whether a file is lockable: if no
files are listed as lockable, then no files are lockable.

Let's add an option for our filters to specify the default value if no
patterns match.  If that default is false, like it should be for
locking, then skip traversing the exclude patterns altogether, since
anything that's not included cannot change the result.  We test both the
case that lockable patterns are present and absent in our test.
2020-06-29 16:35:26 +00:00
..
schemas Make 'locked_at' required in JSON schema 2019-05-16 12:10:16 +03:00
api_test.go locking: rename locks.VerifiableLocks to SearchLocksVerifiable 2019-03-19 17:01:29 +01:00
api.go Fix Typos 2019-07-24 07:17:40 +00:00
cache_test.go Refine naming for LockCache methods 2016-12-14 09:44:58 +00:00
cache.go Fix Typos 2019-07-24 07:17:40 +00:00
lockable.go locking: don't assume files are lockable if no patterns exist 2020-06-29 16:35:26 +00:00
locks_test.go locking: "locks --verify" supports "--cached" 2019-03-28 10:12:41 +01:00
locks.go Allow locking/unlocking of nonexistent files 2020-05-10 19:41:36 -07:00