mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 10:54:25 +02:00
Fix download archive issue
This commit is contained in:
1 parent
612fdb98df
commit
25268577a5
6 files changed
+53
-23
No files matched your search
@@ -200,7 +200,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
|
||||
|
||||
ctx.Repo.Commit, err = gitRepo.GetCommitOfBranch(refName)
|
||||
if err != nil {
|
||||
ctx.Handle(404, "RepoAssignment invalid branch", nil)
|
||||
ctx.Handle(500, "RepoAssignment invalid branch", err)
|
||||
return
|
||||
}
|
||||
ctx.Repo.CommitId = ctx.Repo.Commit.Id.String()
|
||||
@@ -209,14 +209,9 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
|
||||
ctx.Repo.IsTag = true
|
||||
ctx.Repo.BranchName = refName
|
||||
|
||||
ctx.Repo.Tag, err = gitRepo.GetTag(refName)
|
||||
ctx.Repo.Commit, err = gitRepo.GetCommitOfTag(refName)
|
||||
if err != nil {
|
||||
ctx.Handle(404, "RepoAssignment invalid tag", nil)
|
||||
return
|
||||
}
|
||||
ctx.Repo.Commit, err = ctx.Repo.Tag.Commit()
|
||||
if err != nil {
|
||||
ctx.Handle(500, "RepoAssignment", fmt.Errorf("fail to get tag commit(%s): %v", refName, err))
|
||||
ctx.Handle(500, "RepoAssignment invalid tag", err)
|
||||
return
|
||||
}
|
||||
ctx.Repo.CommitId = ctx.Repo.Commit.Id.String()
|
||||
|
||||
Reference in new issue
Block a user