mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
@@ -56,7 +56,6 @@ type Repository struct {
|
||||
// RefFullName is the full ref name that the user is viewing
|
||||
RefFullName git.RefName
|
||||
BranchName string // it is the RefFullName's short name if its type is "branch"
|
||||
TagName string // it is the RefFullName's short name if its type is "tag"
|
||||
TreePath string
|
||||
|
||||
// Commit it is always set to the commit for the branch or tag, or just the commit that the user is viewing
|
||||
@@ -851,7 +850,6 @@ func RepoRefByType(detectRefType git.RefType) func(*Context) {
|
||||
ctx.Repo.CommitID = ctx.Repo.Commit.ID.String()
|
||||
} else if refType == git.RefTypeTag && ctx.Repo.GitRepo.IsTagExist(refShortName) {
|
||||
ctx.Repo.RefFullName = git.RefNameFromTag(refShortName)
|
||||
ctx.Repo.TagName = refShortName
|
||||
|
||||
ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetTagCommit(refShortName)
|
||||
if err != nil {
|
||||
@@ -901,8 +899,6 @@ func RepoRefByType(detectRefType git.RefType) func(*Context) {
|
||||
|
||||
ctx.Data["BranchName"] = ctx.Repo.BranchName
|
||||
|
||||
ctx.Data["TagName"] = ctx.Repo.TagName
|
||||
|
||||
ctx.Data["CommitID"] = ctx.Repo.CommitID
|
||||
|
||||
ctx.Data["CanCreateBranch"] = ctx.Repo.CanCreateBranch() // only used by the branch selector dropdown: AllowCreateNewRef
|
||||
|
Reference in New Issue
Block a user