[X2Go-Commits] [maintenancescripts] 01/01: git/hooks/common.sh: revert GIT_REPO_NAME variable handling.

git-admin at x2go.org git-admin at x2go.org
Thu Nov 23 06:03:04 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository maintenancescripts.

commit c28b9b36cc52bb8cb3585b78780d5c672731666a
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Nov 23 06:02:54 2017 +0100

    git/hooks/common.sh: revert GIT_REPO_NAME variable handling.
    
    We still need that one.
---
 git/hooks/common.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/git/hooks/common.sh b/git/hooks/common.sh
index babec15..1e6b279 100755
--- a/git/hooks/common.sh
+++ b/git/hooks/common.sh
@@ -4,6 +4,12 @@ umask 002
 
 OUTSIDE_REPO="$(dirname "$(readlink -ne "${BASH_SOURCE}")")"
 
+if [ "$(git rev-parse --is-bare-repository)" = "true" ]; then
+  GIT_REPO_NAME="$(basename "${PWD}")"
+else
+  GIT_REPO_NAME="$(basename "$(readlink -nf "${PWD}/..")")"
+fi
+
 # Strip off .git for condensed output.
 SHORT_GIT_REPO_NAME="${GIT_REPO_NAME%.git}"
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git


More information about the x2go-commits mailing list