Skip to content

Commit

Permalink
revert unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang authored Nov 1, 2024
1 parent 75f77d0 commit 2f443b2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions routers/web/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,17 +740,6 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
maxLines, maxFiles = -1, -1
}

baseCommit, err := ctx.Repo.GitRepo.GetCommit(startCommitID)
if err != nil {
ctx.ServerError("GetCommit", err)
return
}
commit, err := gitRepo.GetCommit(endCommitID)
if err != nil {
ctx.ServerError("GetCommit", err)
return
}

diffOptions := &gitdiff.DiffOptions{
AfterCommitID: endCommitID,
SkipTo: ctx.FormString("skip-to"),
Expand Down Expand Up @@ -825,6 +814,17 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
ctx.Data["Diff"] = diff
ctx.Data["DiffNotAvailable"] = diff.NumFiles == 0

baseCommit, err := ctx.Repo.GitRepo.GetCommit(startCommitID)
if err != nil {
ctx.ServerError("GetCommit", err)
return
}
commit, err := gitRepo.GetCommit(endCommitID)
if err != nil {
ctx.ServerError("GetCommit", err)
return
}

if ctx.IsSigned && ctx.Doer != nil {
if ctx.Data["CanMarkConversation"], err = issues_model.CanMarkConversation(ctx, issue, ctx.Doer); err != nil {
ctx.ServerError("CanMarkConversation", err)
Expand Down

0 comments on commit 2f443b2

Please sign in to comment.