From 804edaad6265246360fa1ce80aa75169c61f3ee4 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 5 Apr 2017 13:23:12 +0100 Subject: [PATCH] Use readlink -f instead of realpath ... because readlink has a better chance of being installed. --- hooks/pre-commit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/pre-commit b/hooks/pre-commit index 358bfe9..23f61fc 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -3,8 +3,8 @@ set -eu # make the GIT_DIR and GIT_INDEX_FILE absolute, before we change dir -export GIT_DIR=$(realpath `git rev-parse --git-dir`) -export GIT_INDEX_FILE=$(realpath `git rev-parse --git-path index`) +export GIT_DIR=$(readlink -f `git rev-parse --git-dir`) +export GIT_INDEX_FILE=$(readlink -f `git rev-parse --git-path index`) wd=`pwd`