зеркало из https://github.com/microsoft/git.git
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:
Родитель
d3d0013c59
Коммит
b431b2822f
|
@ -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"`
|
||||
|
|
Загрузка…
Ссылка в новой задаче