|
50 | 50 | 'remote': {'id': 'repo2'},
|
51 | 51 | },
|
52 | 52 | },
|
53 |
| - 'default-branch-scheme': 'master', |
| 53 | + 'default-branch-scheme': 'main', |
54 | 54 | 'branch-schemes': {
|
55 |
| - 'master': { |
56 |
| - 'aliases': ['master'], |
| 55 | + 'main': { |
| 56 | + 'aliases': ['main'], |
57 | 57 | 'repos': {
|
58 |
| - 'repo1': 'master', |
59 |
| - 'repo2': 'master', |
| 58 | + 'repo1': 'main', |
| 59 | + 'repo2': 'main', |
60 | 60 | }
|
61 | 61 | }
|
62 | 62 | }
|
@@ -101,15 +101,19 @@ def setup_mock_remote(base_dir):
|
101 | 101 | create_dir(remote_repo_path)
|
102 | 102 | create_dir(local_repo_path)
|
103 | 103 | call_quietly(['git', 'init', '--bare', remote_repo_path])
|
| 104 | + call_quietly(['git', 'symbolic-ref', 'HEAD', 'refs/heads/main'], |
| 105 | + cwd=remote_repo_path) |
104 | 106 | call_quietly(['git', 'clone', '-l', remote_repo_path, local_repo_path])
|
| 107 | + call_quietly(['git', 'symbolic-ref', 'HEAD', 'refs/heads/main'], |
| 108 | + cwd=local_repo_path) |
105 | 109 | for (i, (filename, contents)) in enumerate(v):
|
106 | 110 | filename_path = os.path.join(local_repo_path, filename)
|
107 | 111 | with open(filename_path, 'w') as f:
|
108 | 112 | f.write(contents)
|
109 | 113 | call_quietly(['git', 'add', filename], cwd=local_repo_path)
|
110 | 114 | call_quietly(['git', 'commit', '-m', 'Commit %d' % i],
|
111 | 115 | cwd=local_repo_path)
|
112 |
| - call_quietly(['git', 'push', 'origin', 'master'], |
| 116 | + call_quietly(['git', 'push', 'origin', 'main'], |
113 | 117 | cwd=local_repo_path)
|
114 | 118 |
|
115 | 119 | base_config = MOCK_CONFIG
|
|
0 commit comments