Versions in this module Expand all Collapse all v0 v0.19.4 May 24, 2023 Changes in this version + const BlobExcerptChunkSize + var ErrorUndefinedCell = errors.New("undefined cell") + func GetWhitespaceFlag(whitespaceBehavior string) git.TrustedCmdArgs + type Diff struct + End string + Files []*DiffFile + IsIncomplete bool + NumFiles int + NumViewedFiles int + Start string + TotalAddition int + TotalDeletion int + func CommentAsDiff(c *issues_model.Comment) (*Diff, error) + func CommentMustAsDiff(c *issues_model.Comment) *Diff + func GetDiff(gitRepo *git.Repository, opts *DiffOptions, files ...string) (*Diff, error) + func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader, skipToFile string) (*Diff, error) + func SyncAndGetUserSpecificDiff(ctx context.Context, userID int64, pull *issues_model.PullRequest, ...) (*Diff, error) + func (diff *Diff) LoadComments(ctx context.Context, issue *issues_model.Issue, currentUser *user_model.User) error + type DiffFile struct + Addition int + Deletion int + HasChangedSinceLastReview bool + Index int + IsAmbiguous bool + IsBin bool + IsCreated bool + IsDeleted bool + IsGenerated bool + IsIncomplete bool + IsIncompleteLineTooLong bool + IsLFSFile bool + IsProtected bool + IsRenamed bool + IsSubmodule bool + IsVendored bool + IsViewed bool + Language string + Name string + NameHash string + OldName string + Sections []*DiffSection + Type DiffFileType + func (diffFile *DiffFile) GetDiffFileName() string + func (diffFile *DiffFile) GetTailSection(gitRepo *git.Repository, leftCommitID, rightCommitID string) *DiffSection + func (diffFile *DiffFile) GetType() int + func (diffFile *DiffFile) ShouldBeHidden() bool + type DiffFileType uint8 + const DiffFileAdd + const DiffFileChange + const DiffFileCopy + const DiffFileDel + const DiffFileRename + type DiffInline struct + Content template.HTML + EscapeStatus *charset.EscapeStatus + func DiffInlineWithHighlightCode(fileName, language, code string, locale translation.Locale) DiffInline + func DiffInlineWithUnicodeEscape(s template.HTML, locale translation.Locale) DiffInline + type DiffLine struct + Comments []*issues_model.Comment + Content string + LeftIdx int + Match 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) GetHTMLDiffLineType() string + 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 DiffOptions struct + AfterCommitID string + BeforeCommitID string + DirectComparison bool + MaxFiles int + MaxLineCharacters int + MaxLines int + SkipTo string + WhitespaceBehavior git.TrustedCmdArgs + type DiffSection struct + FileName string + Lines []*DiffLine + Name string + func (diffSection *DiffSection) GetComputedInlineDiffFor(diffLine *DiffLine, locale translation.Locale) DiffInline + func (diffSection *DiffSection) GetLine(lineType DiffLineType, idx int) *DiffLine + type TableDiffCell struct + LeftCell string + RightCell string + Type TableDiffCellType + type TableDiffCellType uint8 + const TableDiffCellAdd + const TableDiffCellChanged + const TableDiffCellDel + const TableDiffCellMovedChanged + const TableDiffCellMovedUnchanged + const TableDiffCellUnchanged + type TableDiffRow struct + Cells []*TableDiffCell + RowIdx int + type TableDiffSection struct + Rows []*TableDiffRow + func CreateCsvDiff(diffFile *DiffFile, baseReader, headReader *csv.Reader) ([]*TableDiffSection, error)