Summary:
I simplified this code at some point and broke it horribly
in the process. Mask in the right flag here and combine the maps
correctly. This solves the great mystery of increased developer
clowniness.
Test Plan:
Ran 'arc diff' in a working copy with staged but
uncommitted files, got an error message (previously, I didn't).
Reviewed By: aran
Reviewers: mroch, aran
CC: aran
Differential Revision: 104
list($stdout) = execx(
'(cd %s; git diff --no-ext-diff --raw HEAD --)',
$this->getPath());
- $files += $this->parseGitStatus($stdout);
+ $uncommitted_files = $this->parseGitStatus($stdout);
+ foreach ($uncommitted_files as $path => $mask) {
+ $mask |= self::FLAG_UNCOMMITTED;
+ if (!isset($files[$path])) {
+ $files[$path] = 0;
+ }
+ $files[$path] |= $mask;
+ }
// Find untracked files.
list($stdout) = execx(