Skip to content

Commit 19019da

Browse files
committed
lint
1 parent c43bda5 commit 19019da

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

routers/web/repo/pull.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,15 +747,14 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
747747
}
748748

749749
if willShowSpecifiedCommit {
750-
// Attempt to extract parent of endCommit when viewing diff of a specific commit
751-
// instead of showing the entire diff-tree from the merge base.
750+
// Attempt to extract parent of endCommit when viewing diff of a specific commit.
751+
// Instead of showing the entire diff-tree from the merge base, we only show diff-tree from the commit's parent.
752752
// This is mostly for the GetDiffTree() call
753753
endCommit, err := gitRepo.GetCommit(endCommitID)
754754
if err != nil {
755755
ctx.ServerError("GetCommit", err)
756756
return
757757
}
758-
759758
if endCommit.ParentCount() > 0 {
760759
endCommitParent, err := endCommit.Parent(0)
761760
if err != nil {
@@ -764,7 +763,6 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
764763
}
765764
startCommitID = endCommitParent.ID.String()
766765
}
767-
768766
} else {
769767
diffOptions.BeforeCommitID = startCommitID
770768
}

0 commit comments

Comments
 (0)