diff options
author | Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> | 2020-06-11 21:42:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 15:42:55 -0400 |
commit | b682a2c1b2d5efde24378858453903b5b89d6df8 (patch) | |
tree | d123a90d1bb87d836a7afdf2492d1b1142a5b636 /routers | |
parent | e282fbe75380e05b802e228348179774b2975745 (diff) | |
download | gitea-b682a2c1b2d5efde24378858453903b5b89d6df8.tar.gz gitea-b682a2c1b2d5efde24378858453903b5b89d6df8.zip |
Show exact tag for commit on diff view (#11846)
* Show exact tag for commit on diff view
* Fix comment
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/commit.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 2b6c9cece5..004d4915df 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -311,6 +311,12 @@ func Diff(ctx *context.Context) { ctx.ServerError("commit.GetBranchName", err) return } + + ctx.Data["TagName"], err = commit.GetTagName() + if err != nil { + ctx.ServerError("commit.GetTagName", err) + return + } ctx.HTML(200, tplCommitPage) } |