]> git.notmuchmail.org Git - notmuch/commitdiff
CLI/git: suppress warnings about initial branch name
authorDavid Bremner <david@tethera.net>
Sun, 3 Apr 2022 22:17:16 +0000 (16:17 -0600)
committerDavid Bremner <david@tethera.net>
Fri, 17 Jun 2022 11:40:19 +0000 (08:40 -0300)
The canonical nmbug repository still uses "master" as the main branch
name, so defer any potential switch away from that name.

notmuch-git.py

index f3ad6927c6fcc9855f04ebd6fc8438886450c19b..543ef4f1066ab350a3df1b4dc765b129a1d64a4e 100644 (file)
@@ -351,7 +351,8 @@ def init(remote=None):
     This wraps 'git init' with a few extra steps to support subsequent
     status and commit commands.
     """
-    _spawn(args=['git', '--git-dir', NOTMUCH_GIT_DIR, 'init', '--bare'], wait=True)
+    _spawn(args=['git', '--git-dir', NOTMUCH_GIT_DIR, 'init',
+                 '--initial-branch=master', '--quiet', '--bare'], wait=True)
     _git(args=['config', 'core.logallrefupdates', 'true'], wait=True)
     # create an empty blob (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)
     _git(args=['hash-object', '-w', '--stdin'], input='', wait=True)