Check that a tag exists using show-ref instead of looking for the ref file.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
d3d0013c59
commit
b431b2822f
@ -66,7 +66,7 @@ done
|
|||||||
name="$1"
|
name="$1"
|
||||||
[ "$name" ] || usage
|
[ "$name" ] || usage
|
||||||
prev=0000000000000000000000000000000000000000
|
prev=0000000000000000000000000000000000000000
|
||||||
if test -e "$GIT_DIR/refs/tags/$name"
|
if git-show-ref --verify --quiet -- "refs/tags/$name"
|
||||||
then
|
then
|
||||||
test -n "$force" || die "tag '$name' already exists"
|
test -n "$force" || die "tag '$name' already exists"
|
||||||
prev=`git rev-parse "refs/tags/$name"`
|
prev=`git rev-parse "refs/tags/$name"`
|
||||||
|
Loading…
Reference in New Issue
Block a user