From 0d5ff48ee49971d7b4c21fc42c7cdb5cc829b8bd Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Sat, 20 Jun 2020 21:08:58 +0800 Subject: Only display non-remote refs --- git-gmi/git.py | 7 ++++--- 1 file 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 -- cgit v1.2.3