git-server

git server-side stuff | stagit
git clone git://git.ckyln.com/~cem/hooks.git
Log | Files | Refs | README

commit d1450bd62d58b53520b4fb62d81c382175b5842a
parent 9d242ad39b22937e6943e1813c4327d1a70b84f6
Author: Cem Keylan <cem@ckyln.com>
Date:   Fri, 19 Jun 2020 10:04:14 +0300

post-receive: simplify tarball skipping

Diffstat:
Mpost-receive | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/post-receive b/post-receive @@ -68,10 +68,11 @@ ln -sf log.html index.html mkdir -p "$STAGIT_DIR/archive/$repository" git show-ref --tags --heads | while read -r _ ref; do - case "$ref" in refs/heads/*) recreate=1 ;; *) unset recreate; esac tag=${ref#refs/*/} tarball="$STAGIT_DIR/archive/$repository/$repository-$tag.tar.gz" - [ "$recreate" != 1 ] && [ -f "$tarball" ] && continue + + # Unless we are working with a branch, skip recreation of a tarball. + [ "${ref##refs/heads/*}" ] && [ -f "$tarball" ] && continue git archive \ --format tar.gz \