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)
Tue, Nov 19, 2:17 PM
Unknown Object (File)
Sat, Nov 2, 7:06 AM
Unknown Object (File)
Wed, Oct 23, 11:47 AM
Unknown Object (File)
Oct 20 2024, 6:25 AM
Unknown Object (File)
Oct 15 2024, 6:05 AM
Unknown Object (File)
Oct 9 2024, 1:23 PM
Unknown Object (File)
Sep 10 2024, 2:22 PM
Unknown Object (File)
Sep 4 2024, 11:19 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