Merge branch 'forgejo' into forgejo-federated-star

This commit is contained in:
Michael Jerger 2024-05-03 08:44:49 +02:00
commit ee71f86432
273 changed files with 4368 additions and 2199 deletions

View file

@ -865,7 +865,6 @@ func getRefName(ctx *Base, repo *Repository, pathType RepoRefType) string {
case RepoRefBranch:
ref := getRefNameFromPath(ctx, repo, path, repo.GitRepo.IsBranchExist)
if len(ref) == 0 {
// check if ref is HEAD
parts := strings.Split(path, "/")
if parts[0] == headRefName {
@ -1008,7 +1007,6 @@ func RepoRefByType(refType RepoRefType, ignoreNotExistErr ...bool) func(*Context
return cancel
}
ctx.Repo.CommitID = ctx.Repo.Commit.ID.String()
} else if refType.RefTypeIncludesTags() && ctx.Repo.GitRepo.IsTagExist(refName) {
ctx.Repo.IsViewTag = true
ctx.Repo.TagName = refName