Page MenuHomePhabricator

Fix `arc diff` when adding large new file with new git
ClosedPublic

Authored by avivey on Jul 8 2018, 11:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 2:43 AM
Unknown Object (File)
Fri, Apr 19, 7:49 PM
Unknown Object (File)
Wed, Apr 17, 3:01 PM
Unknown Object (File)
Mar 31 2024, 9:53 PM
Unknown Object (File)
Mar 17 2024, 5:09 PM
Unknown Object (File)
Mar 16 2024, 10:28 AM
Unknown Object (File)
Mar 1 2024, 4:01 AM
Unknown Object (File)
Feb 21 2024, 11:54 AM
Subscribers

Details

Summary

See https://discourse.phabricator-community.org/t/arc-not-supporting-git-2-17-1/.
When treating it a large file binary, we try to get the "old" and "new" content using git ls-tree and cat-file.
If the file is new or deleted, there is no old file, so we try to work with filename null.

Under git < 2.17.1, that gets treated as git ls-tree -- ., which falls in the next condition under "no such path".
In git 2.18, etc, this is an error.

Explicitly bail out if there is no filename.

Test Plan

Add a new, large (>4Mb) file, arc diff.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable