commands: BuildRootGitCleanup ignore ref deletion error.

Newer versions of git return errors of "git update-ref -d foo" is run
and foo doesn't exist. Older versions returned without error. A git
update on some servers broke us unexpectedly.

BUG=chromium:650911
TEST=run_tests

Change-Id: Iccd6bc9bc0b52821c29928617d20dba49fd14085
Reviewed-on: https://chromium-review.googlesource.com/390432
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Ningning Xia <nxia@chromium.org>
(cherry picked from commit eb62387504ffea771d5cbef968292b458ff2cf8a)
Reviewed-on: https://chromium-review.googlesource.com/391104
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
diff --git a/cbuildbot/commands.py b/cbuildbot/commands.py
index ca75f8d..4840a1c 100644
--- a/cbuildbot/commands.py
+++ b/cbuildbot/commands.py
@@ -212,7 +212,7 @@
         # Above we deleted refs/heads/<branch> for each created branch, now we
         # need to delete the bare ref <branch> if it was created somehow.
         for ref in constants.CREATED_BRANCHES:
-          git.RunGit(cwd, ['update-ref', '-d', ref])
+          git.RunGit(cwd, ['update-ref', '-d', ref], error_code_ok=True)
 
 
   # Cleanup all of the directories.