]> git.ipfire.org Git - thirdparty/git.git/commitdiff
wt-status: give better advice when cherry-pick is in progress
authorRalf Thielow <ralf.thielow@gmail.com>
Mon, 17 Jun 2013 04:28:26 +0000 (06:28 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Jun 2013 20:16:26 +0000 (13:16 -0700)
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>
t/t7512-status-help.sh
wt-status.c

index bf08d4e098f1bdc3adc5ec3df37b90d90b0e5c8f..4f09beca90ec18c9e541f1f880471f9f2de0de8a 100755 (executable)
@@ -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)
@@ -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:
        #
index bf84a86ee3d6b136bd83115f0bf15a55835817fc..438a40d63739d9397829e83d7af241054f729235 100644 (file)
@@ -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);
 }