@@ -740,17 +740,6 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
740740 maxLines , maxFiles = - 1 , - 1
741741 }
742742
743- baseCommit , err := ctx .Repo .GitRepo .GetCommit (startCommitID )
744- if err != nil {
745- ctx .ServerError ("GetCommit" , err )
746- return
747- }
748- commit , err := gitRepo .GetCommit (endCommitID )
749- if err != nil {
750- ctx .ServerError ("GetCommit" , err )
751- return
752- }
753-
754743 diffOptions := & gitdiff.DiffOptions {
755744 AfterCommitID : endCommitID ,
756745 SkipTo : ctx .FormString ("skip-to" ),
@@ -825,6 +814,17 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
825814 ctx .Data ["Diff" ] = diff
826815 ctx .Data ["DiffNotAvailable" ] = diff .NumFiles == 0
827816
817+ baseCommit , err := ctx .Repo .GitRepo .GetCommit (startCommitID )
818+ if err != nil {
819+ ctx .ServerError ("GetCommit" , err )
820+ return
821+ }
822+ commit , err := gitRepo .GetCommit (endCommitID )
823+ if err != nil {
824+ ctx .ServerError ("GetCommit" , err )
825+ return
826+ }
827+
828828 if ctx .IsSigned && ctx .Doer != nil {
829829 if ctx .Data ["CanMarkConversation" ], err = issues_model .CanMarkConversation (ctx , issue , ctx .Doer ); err != nil {
830830 ctx .ServerError ("CanMarkConversation" , err )
0 commit comments