Skip to content

Commit

Permalink
wt-status: give better advice when cherry-pick is in progress
Browse files Browse the repository at this point in the history
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 <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ralf Thielow authored and Junio C Hamano committed Jun 17, 2013
1 parent edca415 commit b95e66f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions t/t7512-status-help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,8 @@ test_expect_success 'status when cherry-picking before resolving conflicts' '
cat >expected <<-\EOF &&
# On branch cherry_branch
# You are currently cherry-picking.
# (fix conflicts and run "git commit")
# (fix conflicts and run "git cherry-pick --continue")
# (use "git cherry-pick --abort" to cancel the cherry-pick operation)
#
# Unmerged paths:
# (use "git add <file>..." to mark resolution)
Expand All @@ -655,7 +656,8 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '
cat >expected <<-\EOF &&
# On branch cherry_branch
# You are currently cherry-picking.
# (all conflicts fixed: run "git commit")
# (all conflicts fixed: run "git cherry-pick --continue")
# (use "git cherry-pick --abort" to cancel the cherry-pick operation)
#
# Changes to be committed:
#
Expand Down
6 changes: 4 additions & 2 deletions wt-status.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,10 +955,12 @@ static void show_cherry_pick_in_progress(struct wt_status *s,
if (advice_status_hints) {
if (has_unmerged(s))
status_printf_ln(s, color,
_(" (fix conflicts and run \"git commit\")"));
_(" (fix conflicts and run \"git cherry-pick --continue\")"));
else
status_printf_ln(s, color,
_(" (all conflicts fixed: run \"git commit\")"));
_(" (all conflicts fixed: run \"git cherry-pick --continue\")"));
status_printf_ln(s, color,
_(" (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)"));
}
wt_status_print_trailer(s);
}
Expand Down

0 comments on commit b95e66f

Please sign in to comment.