1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Run ls-files from the root of the directory

Summary:
One of our users ran into an issue where they were running `arc diff` in
a subdirectory and it so happened that in that directoy there wasn't any `lfs`
files so the repo was marked as `$is_lfs == false`. Lets allow `arc` to be run
from anywhere.

Test Plan: Internally this patch worked

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D21045
This commit is contained in:
Paul Tarjan 2020-03-25 13:41:59 -07:00
parent 4c12c3119b
commit 33b9728b5f

View file

@ -2900,7 +2900,7 @@ EOTEXT
'uri' => $staging_uri, 'uri' => $staging_uri,
); );
list($stdout) = execx('git ls-files -z -- %s', ':(attr:filter=lfs)'); list($stdout) = $api->execxLocal('ls-files -z -- %s', ':(attr:filter=lfs)');
$is_lfs = strpos($stdout, "\0") !== false; $is_lfs = strpos($stdout, "\0") !== false;
// If the base commit is a real commit, we're going to push it. We don't // If the base commit is a real commit, we're going to push it. We don't