tpost-receive.sh: update http bare repo upon push - stagit - [fork] customized … | |
git clone git://src.adamsgaard.dk/stagit | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 405e3a2e7452e0a09a9e0947b2381715890b3954 | |
parent 603ac9c1b962636abca16b4f000e8ef5b591c219 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sat, 28 Nov 2020 00:58:48 +0100 | |
post-receive.sh: update http bare repo upon push | |
Diffstat: | |
M post-receive.sh | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/post-receive.sh b/post-receive.sh | |
t@@ -72,7 +72,8 @@ stagit-index "${reposdir}/"*/ > "${destdir}/index.html" | |
stagit -c "${cachefile}" "${reposdir}/${r}" | |
# update bare repo for static http clone through alturl | |
-(cd "${htmldir}" && cd "${r}.git" && git update-server-info) | |
+(cd "${htmldir}" && cd "${r}.git" && \ | |
+ git pull >/dev/null && git update-server-info) | |
# disallow access to file and commit contents in parent robots.txt | |
if ! grep -q "Disallow: /${r}/" "${destdir}/robots.txt"; then |