ipost-receive: fix warning in script for example when pushing deleted tags - stagit-gopher - A git gopher frontend. (mirror) Err bitreich.org 70 hgit clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ URL:git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ bitreich.org 70 1Log /scm/stagit-gopher/log.gph bitreich.org 70 1Files /scm/stagit-gopher/files.gph bitreich.org 70 1Refs /scm/stagit-gopher/refs.gph bitreich.org 70 1Tags /scm/stagit-gopher/tag bitreich.org 70 1README /scm/stagit-gopher/file/README.gph bitreich.org 70 1LICENSE /scm/stagit-gopher/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit 68d5f34fe5aadad1b2272f4797ab18bd2938a962 /scm/stagit-gopher/commit/68d5f34fe5aadad1b2272f4797ab18bd2938a962.gph bitreich.org 70 1parent e7bf2942d6f37ffe0ace237d397abf7480e5c945 /scm/stagit-gopher/commit/e7bf2942d6f37ffe0ace237d397abf7480e5c945.gph bitreich.org 70 hAuthor: Hiltjo Posthuma URL:mailto:hiltjo@codemadness.org bitreich.org 70 iDate: Sat, 25 Nov 2017 16:04:24 +0100 Err bitreich.org 70 i Err bitreich.org 70 ipost-receive: fix warning in script for example when pushing deleted tags Err bitreich.org 70 i Err bitreich.org 70 ithe "new" variable would be zero: Err bitreich.org 70 i remote: fatal: bad object 0000000000000000000000000000000000000000 Err bitreich.org 70 i Err bitreich.org 70 iNOTE: when pushing new tags the "old" variable would be zero, this was Err bitreich.org 70 i already fixed. Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M example_post-receive.sh | 1 + Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 1 insertion(+), 0 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/example_post-receive.sh b/example_post-receive.sh /scm/stagit-gopher/file/example_post-receive.sh.gph bitreich.org 70 i@@ -37,6 +37,7 @@ cd "${dir}" || exit 1 Err bitreich.org 70 i force=0 Err bitreich.org 70 i while read -r old new ref; do Err bitreich.org 70 i test "${old}" = "0000000000000000000000000000000000000000" && continue Err bitreich.org 70 i+ test "${new}" = "0000000000000000000000000000000000000000" && continue Err bitreich.org 70 i Err bitreich.org 70 i hasrevs=$(git rev-list "${old}" "^${new}" | sed 1q) Err bitreich.org 70 i if test -n "${hasrevs}"; then Err bitreich.org 70 .