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
F19160432: D19513.id46664.diff
Dec 15 2025, 3:08 PM
F19070390: D19513.diff
Nov 30 2025, 4:34 PM
F19070338: D19513.diff
Nov 30 2025, 4:26 PM
F19070317: D19513.diff
Nov 30 2025, 4:22 PM
F19066094: D19513.id46664.diff
Nov 30 2025, 4:42 AM
F18789947: D19513.id.diff
Oct 15 2025, 11:50 AM
F18786617: D19513.diff
Oct 14 2025, 7:42 PM
F18786201: D19513.diff
Oct 14 2025, 5:50 PM
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