]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Ignore untracked files in lint repository cache key
authorvrana <jakubv@fb.com>
Mon, 28 Jan 2013 23:18:12 +0000 (15:18 -0800)
committervrana <jakubv@fb.com>
Mon, 28 Jan 2013 23:40:47 +0000 (15:40 -0800)
Summary: Some people have 2GB+ untracked files in repo which significantly slows down this or even crashes it.

Test Plan: Added a debug output here and linted repo with untracked path.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, arudolph
Differential Revision: https://secure.phabricator.com/D4713

src/workflow/ArcanistBaseWorkflow.php

index b65d3ced0e7095ccc2e9950527313f92c98537d6..13b0fd0a9fa4887ed39360998d22b8ff13a306ac 100644 (file)
@@ -1549,6 +1549,9 @@ abstract class ArcanistBaseWorkflow extends Phobject {
       $api = $this->getRepositoryAPI();
       $versions = array('' => $api->getSourceControlBaseRevision());
       foreach ($api->getUncommittedStatus() as $path => $mask) {
+        if ($mask & ArcanistRepositoryAPI::FLAG_UNTRACKED) {
+          continue;
+        }
         $versions[$path] = (Filesystem::pathExists($path)
           ? md5_file($path)
           : '');