]> git.armaanb.net Git - stagit.git/blobdiff - example_post-receive.sh
Redirect stdout to correct file.
[stagit.git] / example_post-receive.sh
index 549a7f8b4acbbe9d29ce58507228bcc6870a9270..c9bcb5e61d048a455652c5d197486bfd82b2e1a2 100755 (executable)
@@ -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