From d9bd18b035a2171ae9e17012f2783959df3f9939 Mon Sep 17 00:00:00 2001
From: Thorge Petersen <petersen@rz.uni-kiel.de>
Date: Wed, 20 Apr 2022 11:09:29 +0200
Subject: [PATCH] Removed git commit hash functionality

---
 ckanext/odsh/helpers_tpsh.py           | 8 --------
 ckanext/odsh/plugin.py                 | 1 -
 ckanext/odsh/templates/user/login.html | 5 -----
 3 files changed, 14 deletions(-)

diff --git a/ckanext/odsh/helpers_tpsh.py b/ckanext/odsh/helpers_tpsh.py
index 927313ed..a6345f37 100644
--- a/ckanext/odsh/helpers_tpsh.py
+++ b/ckanext/odsh/helpers_tpsh.py
@@ -215,11 +215,3 @@ def get_body_mail(organization, package):
     mail_url = "URL: " +  url + "%0D%0A"  +  "%0D%0A" 
     message =  mail_titel + mail_document  +  mail_url + "Mein Kommentar:" +  "%0D%0A"    +  "%0D%0A"  +  "%0D%0A"  +  "%0D%0A" 
     return anrede + message
-
-def git_commit_hash():
-    current_dir = os.path.dirname(os.path.abspath(__file__))
-    try:
-        command = 'git log -n 1 --format=%H'
-    except:
-        return 'unknown'
-    return subprocess.check_output([command], shell=True, cwd=current_dir)
\ No newline at end of file
diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py
index 076ca28f..02f683a2 100644
--- a/ckanext/odsh/plugin.py
+++ b/ckanext/odsh/plugin.py
@@ -374,7 +374,6 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm
                 'tpsh_get_resource_size': helpers_tpsh.get_resource_size,
                 'tpsh_get_address_org':helpers_tpsh.get_address_org,
                 'tpsh_get_body_mail':helpers_tpsh.get_body_mail,
-		'tpsh_git_commit_hash': helpers_tpsh.git_commit_hash,
          }
 
     
diff --git a/ckanext/odsh/templates/user/login.html b/ckanext/odsh/templates/user/login.html
index d9fb0ad8..8efc8821 100644
--- a/ckanext/odsh/templates/user/login.html
+++ b/ckanext/odsh/templates/user/login.html
@@ -1,13 +1,8 @@
 {% extends "page.html" %}
 
-{% set commit_hash = h.tpsh_git_commit_hash() %}
-
 {% block subtitle %} {{ _('Login') }} {% endblock %}
 
 {% block skip %}
-<p hidden>
-    version={{ commit_hash }}
-</p>
 {{ super() }}
 {% endblock skip %}
 
-- 
GitLab