isNewStatus determines if a git status code represents a new or untracked file
(status string)
| 454 | |
| 455 | // isNewStatus determines if a git status code represents a new or untracked file |
| 456 | func isNewStatus(status string) bool { |
| 457 | status = strings.TrimSpace(status) |
| 458 | if status == "" { |
| 459 | return false |
| 460 | } |
| 461 | |
| 462 | if status == "??" { |
| 463 | return true |
| 464 | } |
| 465 | |
| 466 | return status[0] == 'A' |
| 467 | } |
| 468 | |
| 469 | func countLinesInFile(path string) (int, error) { |
| 470 | file, err := os.Open(path) |
no outgoing calls
no test coverage detected