diff options
author | Frederick Yin <fkfd@macaw.me> | 2020-06-20 21:08:58 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@macaw.me> | 2020-06-20 21:08:58 +0800 |
commit | 0d5ff48ee49971d7b4c21fc42c7cdb5cc829b8bd (patch) | |
tree | 945fe9fa43ad46e1be273e56a91e226b6705e38b /git-gmi/git.py | |
parent | 5d8be65e92141c86b960692bfb4a68610f6f1a59 (diff) |
Only display non-remote refs
Diffstat (limited to 'git-gmi/git.py')
-rw-r--r-- | git-gmi/git.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/git-gmi/git.py b/git-gmi/git.py index 034c2b2..71769cf 100644 --- a/git-gmi/git.py +++ b/git-gmi/git.py @@ -110,9 +110,10 @@ class GitGmiRepo: response = f"{STATUS_SUCCESS} {META_GEMINI}\n" + self.generate_header() refs = self.get_refs() for ref in refs: - response += ( - f"## {ref['shorthand']}\n=> tree/{ref['shorthand']}/ view tree\n\n" - ) + if ref["shorthand"].find("/") == -1: + response += ( + f"## {ref['shorthand']}\n=> tree/{ref['shorthand']}/ view tree\n\n" + ) return response @classmethod |