mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
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>
This commit is contained in:
parent
3d80017d0c
commit
c32da692de
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue