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
F15490073: D21192.diff
Fri, Apr 11, 2:04 PM
F15490033: D21192.id.diff
Fri, Apr 11, 2:03 PM
F15490011: D21192.id50470.diff
Fri, Apr 11, 2:03 PM
F15490002: D21192.id50469.diff
Fri, Apr 11, 2:03 PM
F15474442: D21192.diff
Sun, Apr 6, 8:43 AM
F15458533: D21192.id50469.diff
Mon, Mar 31, 4:24 AM
F15454717: D21192.id50470.diff
Sat, Mar 29, 7:56 PM
F15453020: D21192.id.diff
Sat, Mar 29, 8:50 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