X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=example_post-receive.sh;h=c9bcb5e61d048a455652c5d197486bfd82b2e1a2;hb=a4ca730e892d29a8fa91a595c42860e88cf67558;hp=549a7f8b4acbbe9d29ce58507228bcc6870a9270;hpb=cfbf4a11adc8c2e3b55724e7341b18b21fc5b6f7;p=stagit.git diff --git a/example_post-receive.sh b/example_post-receive.sh index 549a7f8..c9bcb5e 100755 --- a/example_post-receive.sh +++ b/example_post-receive.sh @@ -14,7 +14,7 @@ export LC_CTYPE="en_US.UTF-8" name="$1" if test "${name}" = ""; then - name=$(basename $(pwd)) + name=$(basename "$(pwd)") fi # config @@ -37,6 +37,7 @@ cd "${dir}" || exit 1 force=0 while read -r old new ref; do test "${old}" = "0000000000000000000000000000000000000000" && continue + test "${new}" = "0000000000000000000000000000000000000000" && continue hasrevs=$(git rev-list "${old}" "^${new}" | sed 1q) if test -n "${hasrevs}"; then