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, Dec 17, 10:20 AM
Unknown Object (File)
Mon, Dec 16, 5:50 AM
Unknown Object (File)
Tue, Dec 3, 1:36 PM
Unknown Object (File)
Thu, Nov 28, 2:29 PM
Unknown Object (File)
Fri, Nov 22, 9:01 PM
Unknown Object (File)
Nov 19 2024, 2:17 PM
Unknown Object (File)
Nov 2 2024, 7:06 AM
Unknown Object (File)
Oct 23 2024, 11:47 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable