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, Dec 26, 7:44 PM
Unknown Object (File)
Dec 12 2024, 1:47 PM
Unknown Object (File)
Dec 5 2024, 1:56 PM
Unknown Object (File)
Nov 29 2024, 12:42 PM
Unknown Object (File)
Nov 26 2024, 10:08 PM
Unknown Object (File)
Nov 22 2024, 1:47 AM
Unknown Object (File)
Nov 21 2024, 10:15 AM
Unknown Object (File)
Nov 18 2024, 1:08 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
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20467
Build 27800: Run Core Tests
Build 27799: arc lint + arc unit