Test Plan: Added debug output for repository version, linted, committed, linted again, saw the same version, changed file, saw different version.
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D4731
protected function getRepositoryVersion() {
if (!$this->repositoryVersion) {
$api = $this->getRepositoryAPI();
- $versions = array('' => $api->getSourceControlBaseRevision());
- foreach ($api->getUncommittedStatus() as $path => $mask) {
- if ($mask & ArcanistRepositoryAPI::FLAG_UNTRACKED) {
- continue;
- }
+ $commit = $api->getSourceControlBaseRevision();
+ $versions = array('' => $commit);
+ foreach ($api->getChangedFiles($commit) as $path => $mask) {
$versions[$path] = (Filesystem::pathExists($path)
? md5_file($path)
: '');