@@ -740,17 +740,6 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
740
740
maxLines , maxFiles = - 1 , - 1
741
741
}
742
742
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
-
754
743
diffOptions := & gitdiff.DiffOptions {
755
744
AfterCommitID : endCommitID ,
756
745
SkipTo : ctx .FormString ("skip-to" ),
@@ -825,6 +814,17 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
825
814
ctx .Data ["Diff" ] = diff
826
815
ctx .Data ["DiffNotAvailable" ] = diff .NumFiles == 0
827
816
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
+
828
828
if ctx .IsSigned && ctx .Doer != nil {
829
829
if ctx .Data ["CanMarkConversation" ], err = issues_model .CanMarkConversation (ctx , issue , ctx .Doer ); err != nil {
830
830
ctx .ServerError ("CanMarkConversation" , err )
0 commit comments