From 33b9728b5f65fd747b7a15c0e25436c63e82f592 Mon Sep 17 00:00:00 2001 From: Paul Tarjan Date: Wed, 25 Mar 2020 13:41:59 -0700 Subject: [PATCH] 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 --- src/workflow/ArcanistDiffWorkflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index e8ce0588..8fb324f4 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -2900,7 +2900,7 @@ EOTEXT '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; // If the base commit is a real commit, we're going to push it. We don't