diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-09-22 17:01:19 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-09-22 17:01:19 -0400 |
commit | 3f707b3f3265c4b3e64e47ee172cc878f3325248 (patch) | |
tree | 254264c45395a6c908e249c94e02efa0860c6d79 /routers | |
parent | 063aacd436da24c2616d68a838959300978afaa5 (diff) | |
download | gitea-3f707b3f3265c4b3e64e47ee172cc878f3325248.tar.gz gitea-3f707b3f3265c4b3e64e47ee172cc878f3325248.zip |
Add basic submodule support
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/view.go | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go index 77f17e7ae0..4e4a7b18ce 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -21,13 +21,6 @@ const ( HOME base.TplName = "repo/home" ) -type fakeCommit struct { - *git.Commit - - RefUrl string - RefId string -} - func Home(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Repo.Repository.Name @@ -153,14 +146,7 @@ func Home(ctx *middleware.Context) { ctx.Handle(404, "GetCommitOfRelPath", err) return } - - commit := fakeCommit{ - Commit: c, - RefUrl: strings.TrimRight(sm.Url, ".git"), - RefId: te.Id.String(), - } - - files = append(files, []interface{}{te, &commit}) + files = append(files, []interface{}{te, git.NewSubModuleFile(c, sm.Url, te.Id.String())}) } } |