From 607303e4dee3ddf9ba3d9d67b0186fc5213b167b Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 14 Mar 2014 22:36:22 +0800 Subject: [PATCH] add id --- models/repo.go | 2 ++ templates/repo/single.tmpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/models/repo.go b/models/repo.go index 6e45367c09ac..a44bf69ad3fd 100644 --- a/models/repo.go +++ b/models/repo.go @@ -267,6 +267,7 @@ const ( ) type RepoFile struct { + Id *git.Oid Type int Name string Message string @@ -303,6 +304,7 @@ func GetReposFiles(userName, reposName, treeName, rpath string) ([]*RepoFile, er entry := tree.EntryByIndex(i) repofiles = append(repofiles, &RepoFile{ + entry.Id, entry.Filemode, entry.Name, lastCommit.Message(), diff --git a/templates/repo/single.tmpl b/templates/repo/single.tmpl index 42e09b9a2f75..c83fcd93cd68 100644 --- a/templates/repo/single.tmpl +++ b/templates/repo/single.tmpl @@ -6,7 +6,7 @@

Source Files: