Commit 77bd7360 authored by mmoss@chromium.org's avatar mmoss@chromium.org

Don't allow 'detached head' branch creation to fail.

This fixes an error if the branch already exists.

Review URL: https://chromiumcodereview.appspot.com/24360009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225278 0039d316-1c4b-4281-b951-d872f2087c98
parent a7893f59
......@@ -1021,7 +1021,7 @@ class GitWrapper(SCMWrapper):
# Let's just save off the commit so we can proceed.
name = ('saved-by-gclient-' +
self._Capture(['rev-parse', '--short', 'HEAD']))
self._Capture(['branch', name])
self._Capture(['branch', '-f', name])
print('\n_____ found an unreferenced commit and saved it as \'%s\'' %
name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment