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)
Apr 16 2026, 8:58 PM
Unknown Object (File)
Feb 20 2026, 6:26 AM
Unknown Object (File)
Feb 20 2026, 6:23 AM
Unknown Object (File)
Feb 20 2026, 6:13 AM
Unknown Object (File)
Jan 30 2026, 11:05 AM
Unknown Object (File)
Jan 27 2026, 9:38 PM
Unknown Object (File)
Jan 18 2026, 12:05 PM
Unknown Object (File)
Jan 5 2026, 2:55 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