mirror of
https://github.com/git/git.git
synced 2024-11-05 00:37:55 +01:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue