| 1497 | } |
| 1498 | |
| 1499 | static void show_rebase_in_progress(struct wt_status *s, |
| 1500 | const char *color) |
| 1501 | { |
| 1502 | struct stat st; |
| 1503 | |
| 1504 | show_rebase_information(s, color); |
| 1505 | if (has_unmerged(s)) { |
| 1506 | print_rebase_state(s, color); |
| 1507 | if (s->hints) { |
| 1508 | status_printf_ln(s, color, |
| 1509 | _(" (fix conflicts and then run \"git rebase --continue\")")); |
| 1510 | status_printf_ln(s, color, |
| 1511 | _(" (use \"git rebase --skip\" to skip this patch)")); |
| 1512 | status_printf_ln(s, color, |
| 1513 | _(" (use \"git rebase --abort\" to check out the original branch)")); |
| 1514 | } |
| 1515 | } else if (s->state.rebase_in_progress || |
| 1516 | !stat(git_path_merge_msg(s->repo), &st)) { |
| 1517 | print_rebase_state(s, color); |
| 1518 | if (s->hints) |
| 1519 | status_printf_ln(s, color, |
| 1520 | _(" (all conflicts fixed: run \"git rebase --continue\")")); |
| 1521 | } else if (split_commit_in_progress(s)) { |
| 1522 | if (s->state.branch) |
| 1523 | status_printf_ln(s, color, |
| 1524 | _("You are currently splitting a commit while rebasing branch '%s' on '%s'."), |
| 1525 | s->state.branch, |
| 1526 | s->state.onto); |
| 1527 | else |
| 1528 | status_printf_ln(s, color, |
| 1529 | _("You are currently splitting a commit during a rebase.")); |
| 1530 | if (s->hints) |
| 1531 | status_printf_ln(s, color, |
| 1532 | _(" (Once your working directory is clean, run \"git rebase --continue\")")); |
| 1533 | } else { |
| 1534 | if (s->state.branch) |
| 1535 | status_printf_ln(s, color, |
| 1536 | _("You are currently editing a commit while rebasing branch '%s' on '%s'."), |
| 1537 | s->state.branch, |
| 1538 | s->state.onto); |
| 1539 | else |
| 1540 | status_printf_ln(s, color, |
| 1541 | _("You are currently editing a commit during a rebase.")); |
| 1542 | if (s->hints && !s->amend) { |
| 1543 | status_printf_ln(s, color, |
| 1544 | _(" (use \"git commit --amend\" to amend the current commit)")); |
| 1545 | status_printf_ln(s, color, |
| 1546 | _(" (use \"git rebase --continue\" once you are satisfied with your changes)")); |
| 1547 | } |
| 1548 | } |
| 1549 | wt_longstatus_print_trailer(s); |
| 1550 | } |
| 1551 | |
| 1552 | static void show_cherry_pick_in_progress(struct wt_status *s, |
| 1553 | const char *color) |
no test coverage detected