()
| 40 | } |
| 41 | |
| 42 | func (a *App) showInteractiveStatus() { |
| 43 | files, err := a.repo.ListModified("") |
| 44 | if err != nil { |
| 45 | return // Silently skip status on error |
| 46 | } |
| 47 | |
| 48 | if len(files) == 0 { |
| 49 | return // No files to show |
| 50 | } |
| 51 | |
| 52 | fmt.Printf(" %s %s %s\n", "staged", "unstaged", "path") |
| 53 | for i, file := range files { |
| 54 | stagePart := file.Index |
| 55 | if stagePart == "" { |
| 56 | stagePart = "unchanged" |
| 57 | } |
| 58 | unstagePart := file.File |
| 59 | if unstagePart == "" { |
| 60 | unstagePart = "nothing" |
| 61 | } |
| 62 | fmt.Printf(" %d: %-12s %s %s\n", |
| 63 | i+1, stagePart, unstagePart, file.Path) |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | func (a *App) initColors() { |
| 68 | a.colors.UseColor = a.repo.GetColorBool("color.interactive") |
no test coverage detected