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.
1 files changed, 1 insertions(+), 0 deletions(-) | |||
---|---|---|---|
M | example_post-receive.sh | +1 | -0 |
1@@ -37,6 +37,7 @@ cd "${dir}" || exit 1
2 force=0
3 while read -r old new ref; do
4 test "${old}" = "0000000000000000000000000000000000000000" && continue
5+ test "${new}" = "0000000000000000000000000000000000000000" && continue
6
7 hasrevs=$(git rev-list "${old}" "^${new}" | sed 1q)
8 if test -n "${hasrevs}"; then