From dbd138f09df42cefedf7b931c86c24729c6105f6 Mon Sep 17 00:00:00 2001 From: Dominik Meyer Date: Tue, 6 Jul 2021 17:36:07 +0200 Subject: [PATCH] ADD: set correct git toplevel directory --- post-commit | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/post-commit b/post-commit index d9e6ddb..57d589a 100644 --- a/post-commit +++ b/post-commit @@ -10,6 +10,9 @@ FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null) # Get the first tag in history that looks like a Release RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null) +# Get toplevel directory +GITDIR=$(git rev-parse --show-toplevel) + # Hoover up the metadata git --no-pager log -1 --date=short --decorate=short \ --pretty=format:"\usepackage[% @@ -28,4 +31,4 @@ git --no-pager log -1 --date=short --decorate=short \ refnames={%d}, firsttagdescribe={$FIRSTTAG}, reltag={$RELTAG} - ]{gitexinfo}" HEAD > .git/gitHeadInfo.gin + ]{gitexinfo}" HEAD > ${GITDIR}/.git/gitHeadInfo.gin