@@ -120,8 +120,8 @@ type Commit struct {
120120
121121// Parser sets values used in GitParse.
122122type Parser struct {
123- maxDiffSize int
124- maxCommitSize int
123+ maxDiffSize int64
124+ maxCommitSize int64
125125 dateFormat string
126126
127127 useCustomContentWriter bool
@@ -188,7 +188,7 @@ func UseCustomContentWriter() Option {
188188
189189// WithMaxDiffSize sets maxDiffSize option. Diffs larger than maxDiffSize will
190190// be truncated.
191- func WithMaxDiffSize (maxDiffSize int ) Option {
191+ func WithMaxDiffSize (maxDiffSize int64 ) Option {
192192 return func (parser * Parser ) {
193193 parser .maxDiffSize = maxDiffSize
194194 }
@@ -197,7 +197,7 @@ func WithMaxDiffSize(maxDiffSize int) Option {
197197// WithMaxCommitSize sets maxCommitSize option. Commits larger than maxCommitSize
198198// will be put in the commit channel and additional diffs will be added to a
199199// new commit.
200- func WithMaxCommitSize (maxCommitSize int ) Option {
200+ func WithMaxCommitSize (maxCommitSize int64 ) Option {
201201 return func (parser * Parser ) {
202202 parser .maxCommitSize = maxCommitSize
203203 }
@@ -210,8 +210,8 @@ type Option func(*Parser)
210210func NewParser (options ... Option ) * Parser {
211211 parser := & Parser {
212212 dateFormat : defaultDateFormat ,
213- maxDiffSize : int ( defaultMaxDiffSize ) ,
214- maxCommitSize : int ( defaultMaxCommitSize ) ,
213+ maxDiffSize : defaultMaxDiffSize ,
214+ maxCommitSize : defaultMaxCommitSize ,
215215 }
216216 for _ , option := range options {
217217 option (parser )
@@ -572,7 +572,7 @@ func (c *Parser) FromReader(ctx context.Context, stdOut io.Reader, diffChan chan
572572 latestState = ParseFailure
573573 }
574574
575- if currentDiff .Len () > c .maxDiffSize {
575+ if int64 ( currentDiff .Len () ) > c .maxDiffSize {
576576 ctx .Logger ().V (2 ).Info (fmt .Sprintf (
577577 "Diff for %s exceeded MaxDiffSize(%d)" , currentDiff .PathB , c .maxDiffSize ,
578578 ))
0 commit comments