git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] fix update-hook-example to work with packed tag references
@ 2008-06-25  8:26 Dmitry Potapov
  2008-06-25  8:26 ` [PATCH 2/2] update-hook-example: optionally allow non-fast-forward Dmitry Potapov
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Potapov @ 2008-06-25  8:26 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Dmitry Potapov

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>
---
 Documentation/howto/update-hook-example.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/howto/update-hook-example.txt b/Documentation/howto/update-hook-example.txt
index 88765b5..a8d3bae 100644
--- a/Documentation/howto/update-hook-example.txt
+++ b/Documentation/howto/update-hook-example.txt
@@ -68,7 +68,7 @@ function info {
 # - 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/*)
-- 
1.5.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-06-25 23:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25  8:26 [PATCH 1/2] fix update-hook-example to work with packed tag references Dmitry Potapov
2008-06-25  8:26 ` [PATCH 2/2] update-hook-example: optionally allow non-fast-forward Dmitry Potapov
2008-06-25 20:04   ` Junio C Hamano
2008-06-25 23:14     ` [PATCH v2] " Dmitry Potapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).