Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
hooks--update: Explicitly check for all zeros for a deleted ref.
author
Alexandre Julliard
<julliard@winehq.org>
Wed, 12 Sep 2007 21:36:03 +0000
(23:36 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 14 Sep 2007 05:33:11 +0000
(22:33 -0700)
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>
templates/hooks--update
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
3d80017
)
diff --git
a/templates/hooks--update
b/templates/hooks--update
index 9d3795c6d055d3ca2b50ac0607607037cb2b8142..d8c76264beaf198f1f3558ca8429349c8eab9ead 100644
(file)
--- 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
# --- 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)
newrev_type=commit
else
newrev_type=$(git-cat-file -t $newrev)