]> source.dussan.org Git - gitea.git/commitdiff
add id
authorLunny Xiao <xiaolunwen@gmail.com>
Fri, 14 Mar 2014 14:36:22 +0000 (22:36 +0800)
committerLunny Xiao <xiaolunwen@gmail.com>
Fri, 14 Mar 2014 14:36:22 +0000 (22:36 +0800)
models/repo.go
templates/repo/single.tmpl

index 6e45367c09ac6e9dd83b44f76d056dd10cc4c379..a44bf69ad3fd267375ba72b6ef0e832895fdf50a 100644 (file)
@@ -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(),
index 42e09b9a2f75d209ed937f143086325413512b8b..c83fcd93cd685f5ed9084512974f25b41b48785a 100644 (file)
@@ -6,7 +6,7 @@
     <h4>Source Files:</h4>
     <ul>
     {{range .Files}}
-        <li>{{.Name}} - {{.Message}} - {{.Created}} - {{.IsFile}} - {{.IsDir}}</li>
+        <li>{{.Name}} - {{.Id}} - {{.Message}} - {{.Created}} - {{.IsFile}} - {{.IsDir}}</li>
     {{end}}
     </ul>
 </div>