summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2beebd2)
raw | patch | inline | side by side (parent: 2beebd2)
author | Dmitry Potapov <dpotapov@gmail.com> | |
Wed, 25 Jun 2008 08:26:55 +0000 (12:26 +0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 Jun 2008 19:44:32 +0000 (12:44 -0700) |
The update-hook-example used 'test -f' to check the tag present, which
does not work if the checked reference is packed. This check has been
changed to use 'git rev-parse $tag' instead.
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
does not work if the checked reference is packed. This check has been
changed to use 'git rev-parse $tag' instead.
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/howto/update-hook-example.txt | patch | blob | history |
diff --git a/Documentation/howto/update-hook-example.txt b/Documentation/howto/update-hook-example.txt
index 88765b55754488223cfe492a83afd1aed5380e61..a8d3bae408b6c502062ebc89e04603fa22b97b88 100644 (file)
# - Branches should only be fast-forwarded.
case "$1" in
refs/tags/*)
- [ -f "$GIT_DIR/$1" ] &&
+ git rev-parse --verify -q "$1" &&
deny >/dev/null "You can't overwrite an existing tag"
;;
refs/heads/*)