From 04105dbb7c65ff9c94d78197c21b8db00acb6964 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 28 Aug 2022 19:29:34 +0800 Subject: [PATCH] Fix download archiver of a commit (#20962) (#20971) --- 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 217cbd3dfc..6b535d0564 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -986,6 +986,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 2ccbcef007..bd1b8a6295 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -122,9 +122,9 @@ {{svg "octicon-download"}}