mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
Mirror fix
This commit is contained in:
parent
d305448fa8
commit
31d613c01d
@ -300,6 +300,12 @@ func ParsePatch(reader io.Reader) (*Diff, error) {
|
||||
}
|
||||
|
||||
i = i + 1
|
||||
|
||||
// Diff data too large.
|
||||
if i == 10000 {
|
||||
return &Diff{}, nil
|
||||
}
|
||||
|
||||
if line == "" {
|
||||
continue
|
||||
}
|
||||
|
@ -103,6 +103,7 @@ func Diff(ctx *middleware.Context, params martini.Params) {
|
||||
ctx.Data["Title"] = commit.Message() + " · " + base.ShortSha(commitId)
|
||||
ctx.Data["Commit"] = commit
|
||||
ctx.Data["Diff"] = diff
|
||||
ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0
|
||||
ctx.Data["IsRepoToolbarCommits"] = true
|
||||
ctx.Data["SourcePath"] = "/" + path.Join(userName, repoName, "src", commitId)
|
||||
ctx.Data["RawPath"] = "/" + path.Join(userName, repoName, "raw", commitId)
|
||||
|
@ -20,6 +20,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if .DiffNotAvailable}}
|
||||
<h4>Diff Data Not Available.</h4>
|
||||
{{else}}
|
||||
<div class="diff-detail-box diff-box">
|
||||
<a class="pull-right btn btn-default" data-toggle="collapse" data-target="#diff-files">Show Diff Stats</a>
|
||||
<p class="showing">
|
||||
@ -97,6 +100,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
Loading…
Reference in New Issue
Block a user