summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Julliard <julliard@winehq.org>2007-09-12 21:36:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-09-14 05:33:11 (GMT)
commitc32da692de332d3c9a0b283066e3786af00f4931 (patch)
treebeed5dbcfd2adff14c492c6f8a5bc8bf258c2fe5
parent3d80017d0c948cca251a7aaa9fdc84a0664e95fe (diff)
downloadgit-c32da692de332d3c9a0b283066e3786af00f4931.zip
git-c32da692de332d3c9a0b283066e3786af00f4931.tar.gz
git-c32da692de332d3c9a0b283066e3786af00f4931.tar.bz2
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 <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--templates/hooks--update2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/hooks--update b/templates/hooks--update
index 9d3795c..d8c7626 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)