()
| 7 | ) |
| 8 | |
| 9 | func (repo *Repo) FilesToBeCommitted() ([]string, error) { |
| 10 | span := tracing.NewSpan("git diff") |
| 11 | defer span.End() |
| 12 | lines, err := repo.ExecCommandLines("git", "diff", "--name-only", "--cached") |
| 13 | if err != nil { |
| 14 | return nil, err |
| 15 | } |
| 16 | return lo.Filter(lines, func(line string, index int) bool { |
| 17 | isFile, _ := repo.isFile(line) |
| 18 | return isFile |
| 19 | }), err |
| 20 | } |
no test coverage detected