mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 10:04:27 +00:00
parent
4d6c8d9b13
commit
bb423f9350
@ -153,7 +153,7 @@ func (repo *Repository) GetTagNameBySHA(sha string) (string, error) {
|
|||||||
|
|
||||||
// GetTagID returns the object ID for a tag (annotated tags have both an object SHA AND a commit SHA)
|
// GetTagID returns the object ID for a tag (annotated tags have both an object SHA AND a commit SHA)
|
||||||
func (repo *Repository) GetTagID(name string) (string, error) {
|
func (repo *Repository) GetTagID(name string) (string, error) {
|
||||||
stdout, err := NewCommand("show-ref", "--", name).RunInDir(repo.Path)
|
stdout, err := NewCommand("show-ref", "--tags", "--", name).RunInDir(repo.Path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user