1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 23:02:41 +01:00

Arc cover handles a file that is added and modified correctly.

Summary:
Modifying a new file and running 'arc cover' before committing the
modifications confused arc. The problem was that 'unstaged' status
erased 'added' status and this caused problems.

Test Plan:
Tested that arc cover ignores added files when they are modified, but
old files that are modified are still handled correctly by arc cover.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, epriestley
Differential Revision: 122
This commit is contained in:
tuomaspelkonen 2011-04-11 13:54:00 -07:00
parent 2cf1393219
commit d67a081243

View file

@ -200,7 +200,9 @@ class ArcanistGitAPI extends ArcanistRepositoryAPI {
if (strlen($stdout)) { if (strlen($stdout)) {
$stdout = explode("\n", $stdout); $stdout = explode("\n", $stdout);
foreach ($stdout as $file) { foreach ($stdout as $file) {
$files[$file] = self::FLAG_UNSTAGED; $files[$file] = isset($files[$file])
? ($files[$file] | self::FLAG_UNSTAGED)
: self::FLAG_UNSTAGED;
} }
} }