[X2Go-Commits] [maintenancescripts] 01/01: git/hooks/common.sh: simplify and fix hooks directory discovery.
git-admin at x2go.org
git-admin at x2go.org
Thu Nov 23 05:21:37 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 76717b56790c2328e5ff25ebe1280552855fe66e
Author: Mihai Moldovan <ionic at ionic.de>
Date: Thu Nov 23 05:20:54 2017 +0100
git/hooks/common.sh: simplify and fix hooks directory discovery.
---
git/hooks/common.sh | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/git/hooks/common.sh b/git/hooks/common.sh
index 71aeb77..babec15 100755
--- a/git/hooks/common.sh
+++ b/git/hooks/common.sh
@@ -2,13 +2,7 @@
umask 002
-if [ "$(git rev-parse --is-bare-repository)" = "true" ]; then
- GIT_REPO_NAME="$(basename "${PWD}")"
- OUTSIDE_REPO="/../"
-else
- GIT_REPO_NAME="$(basename "$(readlink -nf "${PWD}/..")")"
- OUTSIDE_REPO="/../../"
-fi
+OUTSIDE_REPO="$(dirname "$(readlink -ne "${BASH_SOURCE}")")"
# Strip off .git for condensed output.
SHORT_GIT_REPO_NAME="${GIT_REPO_NAME%.git}"
--
Alioth's /srv/git/code.x2go.org/maintenancescripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
More information about the x2go-commits
mailing list