Jelajahi Sumber

Updated git init with -b flag

R=sokcevic@google.com
Bug: 1147123
Change-Id: I98e29c4b7525a15447fb9bdd354b227d8f7469a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3352249
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Aravind Vasudevan 3 tahun lalu
induk
melakukan
e9714986c0
1 mengubah file dengan 1 tambahan dan 4 penghapusan
  1. 1 4
      testing_support/git_test_utils.py

+ 1 - 4
testing_support/git_test_utils.py

@@ -299,12 +299,9 @@ class GitRepo(object):
 
     self.to_schema_refs = ['--branches']
 
-    # TODO(crbug.com/114712) use git.init -b and remove 'checkout' once git is
-    # upgraded to 2.28 on all builders.
-    self.git('init')
+    self.git('init', '-b', DEFAULT_BRANCH)
     self.git('config', 'user.name', 'testcase')
     self.git('config', 'user.email', 'testcase@example.com')
-    self.git('checkout', '-b', DEFAULT_BRANCH)
     for commit in schema.walk():
       self._add_schema_commit(commit, schema.data_for(commit.name))
       self.last_commit = self[commit.name]