aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/last_commit_cache.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/last_commit_cache.go')
-rw-r--r--modules/git/last_commit_cache.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/last_commit_cache.go b/modules/git/last_commit_cache.go
index cf9c10d7b4..cff2556083 100644
--- a/modules/git/last_commit_cache.go
+++ b/modules/git/last_commit_cache.go
@@ -13,7 +13,7 @@ import (
)
func getCacheKey(repoPath, commitID, entryPath string) string {
- hashBytes := sha256.Sum256([]byte(fmt.Sprintf("%s:%s:%s", repoPath, commitID, entryPath)))
+ hashBytes := sha256.Sum256(fmt.Appendf(nil, "%s:%s:%s", repoPath, commitID, entryPath))
return fmt.Sprintf("last_commit:%x", hashBytes)
}