Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit b95e66f

Browse files
ralfthgitster
authored andcommitted
wt-status: give better advice when cherry-pick is in progress
When cherry-pick is in progress, 'git status' gives the advice to run "git commit" to finish the cherry-pick. However, this won't continue the sequencer, when picking a range of commits. Advise users to run "git cherry-pick --continue/--abort"; they work when picking a single commit as well. Signed-off-by: Ralf Thielow <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent edca415 commit b95e66f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

t/t7512-status-help.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,8 @@ test_expect_success 'status when cherry-picking before resolving conflicts' '
632632
cat >expected <<-\EOF &&
633633
# On branch cherry_branch
634634
# You are currently cherry-picking.
635-
# (fix conflicts and run "git commit")
635+
# (fix conflicts and run "git cherry-pick --continue")
636+
# (use "git cherry-pick --abort" to cancel the cherry-pick operation)
636637
#
637638
# Unmerged paths:
638639
# (use "git add <file>..." to mark resolution)
@@ -655,7 +656,8 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '
655656
cat >expected <<-\EOF &&
656657
# On branch cherry_branch
657658
# You are currently cherry-picking.
658-
# (all conflicts fixed: run "git commit")
659+
# (all conflicts fixed: run "git cherry-pick --continue")
660+
# (use "git cherry-pick --abort" to cancel the cherry-pick operation)
659661
#
660662
# Changes to be committed:
661663
#

wt-status.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,10 +955,12 @@ static void show_cherry_pick_in_progress(struct wt_status *s,
955955
if (advice_status_hints) {
956956
if (has_unmerged(s))
957957
status_printf_ln(s, color,
958-
_(" (fix conflicts and run \"git commit\")"));
958+
_(" (fix conflicts and run \"git cherry-pick --continue\")"));
959959
else
960960
status_printf_ln(s, color,
961-
_(" (all conflicts fixed: run \"git commit\")"));
961+
_(" (all conflicts fixed: run \"git cherry-pick --continue\")"));
962+
status_printf_ln(s, color,
963+
_(" (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)"));
962964
}
963965
wt_status_print_trailer(s);
964966
}

0 commit comments

Comments
 (0)