Versions in this module Expand all Collapse all v1 v1.999.0 Jan 31, 2020 v1.8.0 Jan 31, 2020 Changes in this version + const BlobExceprtChunkSize + type Diff struct + Files []*DiffFile + IsIncomplete bool + TotalAddition int + TotalDeletion int + func CommentAsDiff(c *models.Comment) (*Diff, error) + func CommentMustAsDiff(c *models.Comment) *Diff + func GetDiffCommit(repoPath, commitID string, maxLines, maxLineCharacters, maxFiles int) (*Diff, error) + func GetDiffRange(repoPath, beforeCommitID, afterCommitID string, ...) (*Diff, error) + func GetDiffRangeWithWhitespaceBehavior(repoPath, beforeCommitID, afterCommitID string, ...) (*Diff, error) + func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*Diff, error) + func (diff *Diff) LoadComments(issue *models.Issue, currentUser *models.User) error + func (diff *Diff) NumFiles() int + type DiffFile struct + Addition int + Deletion int + Index int + IsBin bool + IsCreated bool + IsDeleted bool + IsIncomplete bool + IsLFSFile bool + IsRenamed bool + IsSubmodule bool + Name string + OldName string + Sections []*DiffSection + Type DiffFileType + func (diffFile *DiffFile) GetHighlightClass() string + func (diffFile *DiffFile) GetTailSection(gitRepo *git.Repository, leftCommitID, rightCommitID string) *DiffSection + func (diffFile *DiffFile) GetType() int + type DiffFileType uint8 + const DiffFileAdd + const DiffFileChange + const DiffFileDel + const DiffFileRename + type DiffLine struct + Comments []*models.Comment + Content string + LeftIdx int + RightIdx int + SectionInfo *DiffLineSectionInfo + Type DiffLineType + func (d *DiffLine) CanComment() bool + func (d *DiffLine) GetBlobExcerptQuery() string + func (d *DiffLine) GetCommentSide() string + func (d *DiffLine) GetExpandDirection() DiffLineExpandDirection + func (d *DiffLine) GetLineTypeMarker() string + func (d *DiffLine) GetType() int + type DiffLineExpandDirection uint8 + const DiffLineExpandDown + const DiffLineExpandNone + const DiffLineExpandSingle + const DiffLineExpandUp + const DiffLineExpandUpDown + type DiffLineSectionInfo struct + LastLeftIdx int + LastRightIdx int + LeftHunkSize int + LeftIdx int + Path string + RightHunkSize int + RightIdx int + type DiffLineType uint8 + const DiffLineAdd + const DiffLineDel + const DiffLinePlain + const DiffLineSection + type DiffSection struct + Lines []*DiffLine + Name string + func (diffSection *DiffSection) GetComputedInlineDiffFor(diffLine *DiffLine) template.HTML + func (diffSection *DiffSection) GetLine(lineType DiffLineType, idx int) *DiffLine