mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-11 20:05:38 +02:00
revert unnecessary change
This commit is contained in:
parent
84bbcf9844
commit
f717d4f2e5
@ -533,26 +533,24 @@ func PrepareCompareDiff(
|
||||
return false
|
||||
}
|
||||
|
||||
commits, err := processGitCommits(ctx, ci.Commits)
|
||||
if err != nil {
|
||||
ctx.ServerError("processGitCommits", err)
|
||||
return false
|
||||
}
|
||||
ctx.Data["Commits"] = commits
|
||||
ctx.Data["CommitCount"] = len(commits)
|
||||
|
||||
title := ci.HeadRef.ShortName()
|
||||
if len(commits) == 1 {
|
||||
c := commits[0]
|
||||
title = strings.TrimSpace(c.UserCommit.Summary())
|
||||
|
||||
if len(ci.Commits) > 0 {
|
||||
commits, err := processGitCommits(ctx, ci.Commits)
|
||||
if err != nil {
|
||||
ctx.ServerError("processGitCommits", err)
|
||||
return false
|
||||
}
|
||||
ctx.Data["Commits"] = commits
|
||||
if len(commits) == 1 {
|
||||
c := commits[0]
|
||||
title = strings.TrimSpace(c.UserCommit.Summary())
|
||||
|
||||
body := strings.Split(strings.TrimSpace(c.UserCommit.Message()), "\n")
|
||||
if len(body) > 1 {
|
||||
ctx.Data["content"] = strings.Join(body[1:], "\n")
|
||||
}
|
||||
body := strings.Split(strings.TrimSpace(c.UserCommit.Message()), "\n")
|
||||
if len(body) > 1 {
|
||||
ctx.Data["content"] = strings.Join(body[1:], "\n")
|
||||
}
|
||||
}
|
||||
ctx.Data["CommitCount"] = len(ci.Commits)
|
||||
|
||||
if len(title) > 255 {
|
||||
var trailer string
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user