]> git.scottworley.com Git - git-cache/blobdiff - test_git_cache.py
Suppress git's init.defaultBranch hints
[git-cache] / test_git_cache.py
index 2990f56d50d35cbea956da36237c9967003e3199..7cd232d7d8be6c4893b1812c71945ff7f4effe22 100644 (file)
@@ -56,7 +56,8 @@ class TestGitCache(unittest.TestCase):
 
         self.tempdir = tempfile.TemporaryDirectory(prefix='git_cache_test-')
         self.upstream = os.path.join(self.tempdir.name, 'upstream')
-        subprocess.run(['git', 'init', self.upstream], check=True)
+        subprocess.run(['git', '-c', 'init.defaultBranch=master',
+                       'init', self.upstream], check=True)
         _commit_file(self.upstream, 'file', 'Contents', 'First commit')
 
     def tearDown(self) -> None: