From: Alexandre Julliard Date: Wed, 12 Sep 2007 21:36:03 +0000 (+0200) Subject: hooks--update: Explicitly check for all zeros for a deleted ref. X-Git-Tag: v1.5.3.2~27 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c32da692de332d3c9a0b283066e3786af00f4931;p=git.git hooks--update: Explicitly check for all zeros for a deleted ref. The previous check caused the hook to reject as unannotated any tag whose SHA1 starts with a zero. Signed-off-by: Alexandre Julliard Signed-off-by: Junio C Hamano --- diff --git a/templates/hooks--update b/templates/hooks--update index 9d3795c6d..d8c76264b 100644 --- a/templates/hooks--update +++ b/templates/hooks--update @@ -42,7 +42,7 @@ fi # --- Check types # if $newrev is 0000...0000, it's a commit to delete a branch -if [ -z "${newrev##0*}" ]; then +if [ "$newrev" = "0000000000000000000000000000000000000000" ]; then newrev_type=commit else newrev_type=$(git-cat-file -t $newrev)