Commit cb340f5b authored by Andrew Grieve's avatar Andrew Grieve Committed by LUCI CQ

Fix git_common_test.py: git checkout -tb -> git checkout -t -b

git now takes an optional parameter for -t

Bug: 1288010
Change-Id: I0b7b212229f8df846a2d80a1632387982fd7358e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3395441
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
parent fd7427cc
......@@ -472,7 +472,7 @@ class GitMutableFunctionsTest(git_test_utils.GitRepoReadWriteTestBase,
self.repo.git('commit', '--allow-empty', '-am', 'foooooo')
self.assertEqual(self.repo.run(self.gc.upstream, 'bobly'), None)
self.assertEqual(self.repo.run(self.gc.upstream, 'main'), None)
self.repo.git('checkout', '-tb', 'happybranch', 'main')
self.repo.git('checkout', '-t', '-b', 'happybranch', 'main')
self.assertEqual(self.repo.run(self.gc.upstream, 'happybranch'),
'main')
......@@ -482,12 +482,12 @@ class GitMutableFunctionsTest(git_test_utils.GitRepoReadWriteTestBase,
def testGetBranchesInfo(self):
self.repo.git('commit', '--allow-empty', '-am', 'foooooo')
self.repo.git('checkout', '-tb', 'happybranch', 'main')
self.repo.git('checkout', '-t', '-b', 'happybranch', 'main')
self.repo.git('commit', '--allow-empty', '-am', 'foooooo')
self.repo.git('checkout', '-tb', 'child', 'happybranch')
self.repo.git('checkout', '-t', '-b', 'child', 'happybranch')
self.repo.git('checkout', '-tb', 'to_delete', 'main')
self.repo.git('checkout', '-tb', 'parent_gone', 'to_delete')
self.repo.git('checkout', '-t', '-b', 'to_delete', 'main')
self.repo.git('checkout', '-t', '-b', 'parent_gone', 'to_delete')
self.repo.git('branch', '-D', 'to_delete')
supports_track = (
......@@ -527,7 +527,7 @@ class GitMutableFunctionsTest(git_test_utils.GitRepoReadWriteTestBase,
def testGetBranchesInfoWithReset(self):
self.repo.git('commit', '--allow-empty', '-am', 'foooooo')
self.repo.git('checkout','-tb', 'foobarA', 'main')
self.repo.git('checkout','-t', '-b', 'foobarA', 'main')
self.repo.git('config', 'branch.foobarA.base',
self.repo.run(self.gc.hash_one, 'main'))
self.repo.git('config', 'branch.foobarA.base-upstream', 'main')
......@@ -542,7 +542,7 @@ class GitMutableFunctionsTest(git_test_utils.GitRepoReadWriteTestBase,
self.repo.git('add', 'foobar2')
self.repo.git_commit('commit2')
self.repo.git('checkout','-tb', 'foobarB', 'foobarA')
self.repo.git('checkout','-t', '-b', 'foobarB', 'foobarA')
self.repo.git('config', 'branch.foobarB.base',
self.repo.run(self.gc.hash_one, 'foobarA'))
self.repo.git('config', 'branch.foobarB.base-upstream', 'foobarA')
......
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