aboutsummaryrefslogtreecommitdiffstats
path: root/example_post-receive.sh
diff options
context:
space:
mode:
authorHiltjo Posthuma <[email protected]>2017-11-25 16:02:24 +0100
committerHiltjo Posthuma <[email protected]>2017-11-25 16:02:24 +0100
commit020673b8fddfc649e391831aee2e5562ac25210c (patch)
treed3887ef5b2b52943441834f604a2faf62f97657c /example_post-receive.sh
parent1add4bf3ae0105ce19d9189a499bf450e32ec171 (diff)
downloadstagit-020673b8fddfc649e391831aee2e5562ac25210c.tar.gz
stagit-020673b8fddfc649e391831aee2e5562ac25210c.zip
post-receive: fix warning in script for example when pushing deleted tags
the "new" variable would be zero: remote: fatal: bad object 0000000000000000000000000000000000000000 NOTE: when pushing new tags the "old" variable would be zero, this was already fixed.
Diffstat (limited to 'example_post-receive.sh')
-rwxr-xr-xexample_post-receive.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/example_post-receive.sh b/example_post-receive.sh
index 549a7f8..0655569 100755
--- a/example_post-receive.sh
+++ b/example_post-receive.sh
@@ -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