diff options
| author | David Bremner <david@tethera.net> | 2022-04-03 21:05:36 -0600 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-06-17 08:40:19 -0300 |
| commit | a01378e48d97694b0061870c0ba1fc2913e0affb (patch) | |
| tree | 5005700021163e4ba0b388c7ab3bf390da82efa2 | |
| parent | b7b111b9b599897a873be61eb3db475bafda1ffe (diff) | |
CLI/git: make existance of config branch optional on clone
This branch is actually only used by an associated
utility (notmuch-report), and notmuch-git works fine without it.
| -rw-r--r-- | notmuch-git.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/notmuch-git.py b/notmuch-git.py index 34d07125..0cbfec61 100644 --- a/notmuch-git.py +++ b/notmuch-git.py @@ -271,7 +271,13 @@ def clone(repository): wait=True) _git(args=['config', '--unset', 'core.worktree'], wait=True, expect=(0, 5)) _git(args=['config', 'core.bare', 'true'], wait=True) - _git(args=['branch', 'config', 'origin/config'], wait=True) + (status, stdout, stderr) = _git(args=['show-ref', '--verify', + '--quiet', + 'refs/remotes/origin/config'], + expect=(0,1), + wait=True) + if status == 0: + _git(args=['branch', 'config', 'origin/config'], wait=True) existing_tags = get_tags() if existing_tags: _LOG.warning( |
