vscode: let cSpell work on commit messages, too
[gitweb.git] / t / lib-t6000.sh
index 3f2d873fec9ed9e98b787cd708cd9e8e816e7573..b0ed4767e320e200c592e979dce0fa1e4cfd6ede 100644 (file)
@@ -4,11 +4,11 @@ mkdir -p .git/refs/tags
 
 >sed.script
 
-# Answer the sha1 has associated with the tag. The tag must exist in .git/refs/tags
+# Answer the sha1 has associated with the tag. The tag must exist under refs/tags
 tag () {
        _tag=$1
-       test -f ".git/refs/tags/$_tag" || error "tag: \"$_tag\" does not exist"
-       cat ".git/refs/tags/$_tag"
+       git rev-parse --verify "refs/tags/$_tag" ||
+       error "tag: \"$_tag\" does not exist"
 }
 
 # Generate a commit using the text specified to make it unique and the tree