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
F18622152: D21192.diff
Mon, Sep 15, 10:37 AM
F18413000: D21192.id.diff
Sat, Aug 30, 7:09 AM
F18403535: D21192.diff
Fri, Aug 29, 9:19 PM
F18190987: D21192.id50469.diff
Aug 17 2025, 2:05 AM
F18101061: D21192.diff
Aug 9 2025, 12:18 PM
F17940876: D21192.id50470.diff
Jul 31 2025, 4:49 AM
F17897642: D21192.id.diff
Jul 29 2025, 7:43 AM
F17880554: D21192.diff
Jul 28 2025, 9:32 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable