Skip to content

Commit

Permalink
Check that a tag exists using show-ref instead of looking for the ref…
Browse files Browse the repository at this point in the history
… file.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Christian Couder authored and Junio C Hamano committed Oct 1, 2006
1 parent d3d0013 commit b431b28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ done
name="$1"
[ "$name" ] || usage
prev=0000000000000000000000000000000000000000
if test -e "$GIT_DIR/refs/tags/$name"
if git-show-ref --verify --quiet -- "refs/tags/$name"
then
test -n "$force" || die "tag '$name' already exists"
prev=`git rev-parse "refs/tags/$name"`
Expand Down

0 comments on commit b431b28

Please sign in to comment.