Add basic submodule support
This commit is contained in:
parent
063aacd436
commit
3f707b3f32
6 changed files with 57 additions and 19 deletions
|
@ -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())})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue