Skip to content

Commit cd76f05

Browse files
committed
Fix lint
1 parent a417568 commit cd76f05

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

modules/git/attribute/batch.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func NewBatchChecker(repo *git.Repository, treeish string, attributes ...string)
4444
cancel: cancel,
4545
}
4646

47-
if err := checker.init(ctx); err != nil {
47+
if err := checker.init(); err != nil {
4848
log.Error("Unable to open attribute checker for commit %s, error: %v", treeish, err)
4949
checker.Close()
5050
return nil, err
@@ -62,7 +62,7 @@ func NewBatchChecker(repo *git.Repository, treeish string, attributes ...string)
6262
}
6363

6464
// init initializes the AttributeChecker
65-
func (c *BatchChecker) init(ctx context.Context) error {
65+
func (c *BatchChecker) init() error {
6666
if len(c.Attributes) == 0 {
6767
lw := new(nulSeparatedAttributeWriter)
6868
lw.attributes = make(chan attributeTriple)

services/gitdiff/gitdiff.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ func GetDiffForRender(ctx context.Context, gitRepo *git.Repository, opts *DiffOp
12381238
return nil, err
12391239
}
12401240

1241-
checker, err := attribute.NewBatchChecker(gitRepo, opts.AfterCommitID)
1241+
checker, err := attribute.NewBatchChecker(gitRepo, opts.AfterCommitID, attribute.LinguistVendored, attribute.LinguistGenerated, attribute.LinguistLanguage, attribute.GitlabLanguage)
12421242
if err != nil {
12431243
return nil, err
12441244
}

0 commit comments

Comments
 (0)