From b0c62846f10dfe91481371d3d7e1860d292d1058 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 26 Aug 2022 21:07:06 +0800 Subject: [PATCH] Fix download archiver of a commit (#20962) --- modules/context/repo.go | 1 + templates/repo/home.tmpl | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/context/repo.go b/modules/context/repo.go index 1e0f6461a2..5404acc05a 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -987,6 +987,7 @@ func RepoRefByType(refType RepoRefType, ignoreNotExistErr ...bool) func(*Context } ctx.Data["BranchName"] = ctx.Repo.BranchName + ctx.Data["RefName"] = ctx.Repo.RefName ctx.Data["BranchNameSubURL"] = ctx.Repo.BranchNameSubURL() ctx.Data["TagName"] = ctx.Repo.TagName ctx.Data["CommitID"] = ctx.Repo.CommitID diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 7b74c1cc76..fd1b60bef8 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -121,9 +121,9 @@ {{svg "octicon-download"}}