From 54aee3f253186e7940c44a498234f8bee4bf5642 Mon Sep 17 00:00:00 2001 From: jackHay22 Date: Thu, 10 Aug 2023 14:19:48 -0400 Subject: [PATCH] set commit id when ref used explicitly --- modules/context/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/context/api.go b/modules/context/api.go index a367597e8a44e..58532b883dde0 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -340,6 +340,7 @@ func RepoRefForAPI(next http.Handler) http.Handler { return } ctx.Repo.Commit = commit + ctx.Repo.CommitID = ctx.Repo.Commit.ID.String() ctx.Repo.TreePath = ctx.Params("*") next.ServeHTTP(w, req) return