diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.go index 5148c7bb67e9..f224ef5f72bd 100644 --- a/pkg/sources/git/git.go +++ b/pkg/sources/git/git.go @@ -115,6 +115,9 @@ func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, s.sourceId = sourceId s.jobId = jobId s.verify = verify + if s.scanOptions == nil { + s.scanOptions = &ScanOptions{} + } var conn sourcespb.Git if err := anypb.UnmarshalTo(connection, &conn, proto.UnmarshalOptions{}); err != nil {