HomePhabricator

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

Description

Fix arc diff when adding large new file with new git

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.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D19513

Details

Provenance
aviveyAuthored on Jul 9 2018, 5:59 PM
industryPushed on Jul 9 2018, 5:59 PM
Reviewer
Blessed Reviewers
Differential Revision
D19513: Fix `arc diff` when adding large new file with new git
Parents
rARC222800a86ed0: Parse Mercurial changeset evolution "instability" log field
Branches
Unknown
Tags
Unknown
Build Status
Buildable 20468
Build 27801: Run Core Tests