From d67a081243a56807161cd24270794cf04b5a819a Mon Sep 17 00:00:00 2001 From: tuomaspelkonen Date: Mon, 11 Apr 2011 13:54:00 -0700 Subject: [PATCH] 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 --- src/repository/api/git/ArcanistGitAPI.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } }