(ctx context.Context)
| 319 | } |
| 320 | |
| 321 | func (p *Provider) untrackedFilesList(ctx context.Context) ([]string, error) { |
| 322 | out, err := p.runGit(ctx, "-c", "core.quotepath=false", "ls-files", "--others", "--exclude-standard") |
| 323 | if err != nil || out == "" { |
| 324 | return nil, nil |
| 325 | } |
| 326 | patterns := p.loadGitignorePatterns() |
| 327 | var files []string |
| 328 | for _, line := range strings.Split(strings.TrimSpace(out), "\n") { |
| 329 | line = strings.TrimSpace(line) |
| 330 | if line == "" { |
| 331 | continue |
| 332 | } |
| 333 | if !p.isPathExcluded(line, patterns) { |
| 334 | files = append(files, line) |
| 335 | } |
| 336 | } |
| 337 | return files, nil |
| 338 | } |
| 339 | |
| 340 | func (p *Provider) runGit(ctx context.Context, args ...string) (string, error) { |
| 341 | if p.runner != nil { |
no test coverage detected