mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add basic submodule support
This commit is contained in:
@@ -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())})
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user