(cwd string, timeout time.Duration, args ...string)
| 293 | } |
| 294 | if output, ok := runGitCommand(cwd, secondsDuration(timeout), "status", "--short"); ok { |
| 295 | output = strings.TrimSpace(output) |
| 296 | if output != "" { |
| 297 | lines = append(lines, "Working tree status:") |
| 298 | for idx, statusLine := range strings.Split(output, "\n") { |
| 299 | if idx >= 20 { |
| 300 | break |
| 301 | } |
| 302 | lines = append(lines, " "+statusLine) |
| 303 | } |
| 304 | } |
| 305 | } |
| 306 | return strings.Join(lines, "\n") |
| 307 | } |
| 308 |