summaryrefslogtreecommitdiff
path: root/git-gmi/gateway.py
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@macaw.me>2020-06-20 18:43:16 +0800
committerFrederick Yin <fkfd@macaw.me>2020-06-20 18:43:16 +0800
commitc6d86838dcd22296278b249d995b0b38632a82bf (patch)
treedf7bcc6bea7f421d0846acf3187042f772bc0137 /git-gmi/gateway.py
parent036159de2770b5ca9698474dd15fb63e04a51190 (diff)
Refs view
Diffstat (limited to 'git-gmi/gateway.py')
-rw-r--r--git-gmi/gateway.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-gmi/gateway.py b/git-gmi/gateway.py
index bb7f2e0..671d5cd 100644
--- a/git-gmi/gateway.py
+++ b/git-gmi/gateway.py
@@ -73,5 +73,13 @@ def handle_cgi_request(path: str, query: str):
print(STATUS_TEMPORARY_FAILURE)
return
+ elif view == "refs":
+ try:
+ print(repo.view_refs())
+ return
+ except:
+ print(STATUS_TEMPORARY_FAILURE)
+ return
+
handle_cgi_request(environ.get("PATH_INFO"), environ.get("QUERY_STRING"))