chore: Remove `IsTagExist`
- Introduced in1ebb35b988
and removed in2af67f6044
.
This commit is contained in:
parent
6fd9c065dc
commit
d2701877c0
|
@ -104,7 +104,6 @@ code.gitea.io/gitea/modules/git
|
||||||
CommitChangesWithArgs
|
CommitChangesWithArgs
|
||||||
SetUpdateHook
|
SetUpdateHook
|
||||||
openRepositoryWithDefaultContext
|
openRepositoryWithDefaultContext
|
||||||
IsTagExist
|
|
||||||
ToEntryMode
|
ToEntryMode
|
||||||
|
|
||||||
code.gitea.io/gitea/modules/gitgraph
|
code.gitea.io/gitea/modules/gitgraph
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
package git
|
package git
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
@ -20,11 +19,6 @@ import (
|
||||||
// TagPrefix tags prefix path on the repository
|
// TagPrefix tags prefix path on the repository
|
||||||
const TagPrefix = "refs/tags/"
|
const TagPrefix = "refs/tags/"
|
||||||
|
|
||||||
// IsTagExist returns true if given tag exists in the repository.
|
|
||||||
func IsTagExist(ctx context.Context, repoPath, name string) bool {
|
|
||||||
return IsReferenceExist(ctx, repoPath, TagPrefix+name)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateTag create one tag in the repository
|
// CreateTag create one tag in the repository
|
||||||
func (repo *Repository) CreateTag(name, revision string) error {
|
func (repo *Repository) CreateTag(name, revision string) error {
|
||||||
_, _, err := NewCommand(repo.Ctx, "tag").AddDashesAndList(name, revision).RunStdString(&RunOpts{Dir: repo.Path})
|
_, _, err := NewCommand(repo.Ctx, "tag").AddDashesAndList(name, revision).RunStdString(&RunOpts{Dir: repo.Path})
|
||||||
|
|
Loading…
Reference in New Issue