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
experimental/szager/collated-output
mmoss@chromium.org 12 years ago
parent a7893f5989
commit 77bd7360ab

@ -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)

Loading…
Cancel
Save