From: tuomaspelkonen Date: Mon, 11 Apr 2011 20:54:00 +0000 (-0700) Subject: Arc cover handles a file that is added and modified correctly. X-Git-Tag: conduit-4~354 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=d67a081243a56807161cd24270794cf04b5a819a;p=arcanist.git 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 --- diff --git a/src/repository/api/git/ArcanistGitAPI.php b/src/repository/api/git/ArcanistGitAPI.php index 7ac4af56..d74f4dbe 100644 --- a/src/repository/api/git/ArcanistGitAPI.php +++ b/src/repository/api/git/ArcanistGitAPI.php @@ -200,7 +200,9 @@ class ArcanistGitAPI extends ArcanistRepositoryAPI { if (strlen($stdout)) { $stdout = explode("\n", $stdout); foreach ($stdout as $file) { - $files[$file] = self::FLAG_UNSTAGED; + $files[$file] = isset($files[$file]) + ? ($files[$file] | self::FLAG_UNSTAGED) + : self::FLAG_UNSTAGED; } }