Gclient with git cache: delete conflicting mirror.
Gclient with git cache: delete conflicting mirror.

Consider an SVN repo which was mirrored to git by git_updater. When SVN repo is migrated to github, the git histories of chromium mirror and new github one are different. As a result, hashes of the objects do not match.

Before, gclient would just get stuck at trying to fetch the repo after changing its remote url with errors like this:

...
[0:01:21] error: refs/heads/master does not point to a valid object!
[0:01:21] error: refs/remotes/origin/HEAD does not point to a valid object!
[0:01:21] error: refs/remotes/origin/master does not point to a valid object!
[0:01:21] error: refs/heads/master does not point to a valid object!
[0:01:21] error: refs/remotes/origin/HEAD does not point to a valid object!
[0:01:21] error: refs/remotes/origin/master does not point to a valid object!
[0:01:21] fatal: bad object HEAD
[0:01:21] error: /b/git-cache/chromium.googlesource.com-external-github.com-google-open--vcdiff did not send all necessary objects


The solution is to notice such state, delete the .git folder, and clone again.


BUG=523239
R=akuegel@chromium.org

Review URL: https://codereview.chromium.org/1303293002

git-svn-id: bd64dd6fa6f3f0ed0c0666d1018379882b742947@296417 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools