Page MenuHomePhabricator

Restore the ":(attr:filter=lfs)" test for LFS
ClosedPublic

Authored by epriestley on Apr 30 2020, 4:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 5:14 PM
Unknown Object (File)
Fri, Apr 19, 12:02 AM
Unknown Object (File)
Thu, Apr 18, 1:14 PM
Unknown Object (File)
Tue, Apr 16, 7:31 AM
Unknown Object (File)
Sat, Apr 6, 4:35 AM
Unknown Object (File)
Mon, Apr 1, 2:11 AM
Unknown Object (File)
Fri, Mar 29, 8:47 AM
Unknown Object (File)
Mar 10 2024, 12:24 AM
Subscribers

Details

Summary

See D21190. The ".gitattributes" approach fails when ".gitattributes" is in a subdirectory (or global). These are probably unusual cases, but at least one is known in the wild.

Instead:

  • Restore the ":(attr:filter=lfs)" test, which seems to be the fastest accurate test available in modern Git.
  • If the test fails, assume the repository is not LFS. This only impacts users running very old versions of Git.
Test Plan
  • In LFS and non-LFS repositories, created diffs. Saw correct detection again.
  • Broke the command on purpose, saw LFS detection conclude "no LFS", but not fail disastrously.

Diff Detail

Repository
rARC Arcanist
Branch
lfs2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24284
Build 33452: Run Core Tests
Build 33451: arc lint + arc unit