@matheusbsbs / matheus-bagliano / commits / c32da692de
Fork 0

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>

Alexandre Julliard committed Sep 12, 2007 at 23:36 UTC c32da692de332d3c9a0b283066e3786af00f4931
1 file changed +1 -1
templates/hooks--update
+1 -1
@@ -42,7 +42,7 @@ fi
42
43 # --- Check types
44 # if $newrev is 0000...0000, it's a commit to delete a branch
45 -if [ -z "${newrev##0*}" ]; then
45 +if [ "$newrev" = "0000000000000000000000000000000000000000" ]; then
46 newrev_type=commit
47 else
48 newrev_type=$(git-cat-file -t $newrev)