[PATCH 06/16] CLI/git: suppress warnings about initial branch name

Subject:[PATCH 06/16] CLI/git: suppress warnings about initial branch name

Date:Sat, 23 Apr 2022 10:38:38 -0300

To:notmuch@notmuchmail.org

Cc:

From:David Bremner


The canonical nmbug repository still uses "master" as the main branch
name, so defer any potential switch away from that name.
---
 notmuch-git.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/notmuch-git.in b/notmuch-git.in
index d574f19e..3a58fd28 100755
--- a/notmuch-git.in
+++ b/notmuch-git.in
@@ -384,7 +384,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', NMBGIT, 'init', '--bare'], wait=True)
+    _spawn(args=['git', '--git-dir', NMBGIT, '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)
-- 
2.35.2

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: