{"thread":{"id":"34170","subject":"[PATCH] wt-status: give better advice when cherry-pick is in progress","startedAt":"2013-06-17T04:28:26Z","lastAt":"2013-06-17T20:15:58Z","messageCount":4,"participants":["Ralf Thielow","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"221030","messageId":"1371443306-3073-1-git-send-email-ralf.thielow@gmail.com","threadId":"34170","inReplyTo":null,"subject":"[PATCH] wt-status: give better advice when cherry-pick is in progress","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2013-06-17T04:28:26Z","receivedAt":"2013-06-17T04:28:26Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"When cherry-pick is in progress, 'git status' gives the advice to\nrun \"git commit\" to finish the cherry-pick. However, this won't continue\nthe sequencer.\n\"git status\" should give the advice of running \"git cherry-pick --continue\"\nor \"git cherry-pick --abort\".\n\nSigned-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n---\n t/t7512-status-help.sh | 6 ++++--\n wt-status.c            | 6 ++++--\n 2 files changed, 8 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\nindex bf08d4e..4f09bec 100755\n--- a/t/t7512-status-help.sh\n+++ b/t/t7512-status-help.sh\n@@ -632,7 +632,8 @@ test_expect_success 'status when cherry-picking before resolving conflicts' '\n \tcat >expected <<-\\EOF &&\n \t# On branch cherry_branch\n \t# You are currently cherry-picking.\n-\t#   (fix conflicts and run \"git commit\")\n+\t#   (fix conflicts and run \"git cherry-pick --continue\")\n+\t#   (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n \t#\n \t# Unmerged paths:\n \t#   (use \"git add <file>...\" to mark resolution)\n@@ -655,7 +656,8 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '\n \tcat >expected <<-\\EOF &&\n \t# On branch cherry_branch\n \t# You are currently cherry-picking.\n-\t#   (all conflicts fixed: run \"git commit\")\n+\t#   (all conflicts fixed: run \"git cherry-pick --continue\")\n+\t#   (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n \t#\n \t# Changes to be committed:\n \t#\ndiff --git a/wt-status.c b/wt-status.c\nindex bf84a86..438a40d 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -955,10 +955,12 @@ static void show_cherry_pick_in_progress(struct wt_status *s,\n \tif (advice_status_hints) {\n \t\tif (has_unmerged(s))\n \t\t\tstatus_printf_ln(s, color,\n-\t\t\t\t_(\"  (fix conflicts and run \\\"git commit\\\")\"));\n+\t\t\t\t_(\"  (fix conflicts and run \\\"git cherry-pick --continue\\\")\"));\n \t\telse\n \t\t\tstatus_printf_ln(s, color,\n-\t\t\t\t_(\"  (all conflicts fixed: run \\\"git commit\\\")\"));\n+\t\t\t\t_(\"  (all conflicts fixed: run \\\"git cherry-pick --continue\\\")\"));\n+\t\tstatus_printf_ln(s, color,\n+\t\t\t_(\"  (use \\\"git cherry-pick --abort\\\" to cancel the cherry-pick operation)\"));\n \t}\n \twt_status_print_trailer(s);\n }\n-- \n1.8.3.1.3.gf2b4626.dirty\n"},{"id":"221089","messageId":"7vppvkczqu.fsf@alter.siamese.dyndns.org","threadId":"34170","inReplyTo":"1371443306-3073-1-git-send-email-ralf.thielow@gmail.com","subject":"Re: [PATCH] wt-status: give better advice when cherry-pick is in progress","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-17T19:18:33Z","receivedAt":"2013-06-17T19:18:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ralf Thielow <ralf.thielow@gmail.com> writes:\n\n> When cherry-pick is in progress, 'git status' gives the advice to\n> run \"git commit\" to finish the cherry-pick. However, this won't continue\n> the sequencer.\n> \"git status\" should give the advice of running \"git cherry-pick --continue\"\n> or \"git cherry-pick --abort\".\n\nIs the above _always_ the case, or does the updated advice message\nonly apply when you are cherry-picking a range of commits with \"git\ncherry-pick A..B\"?  In other words, when \"git cherry-pick $it\" (a\nsingle commit) stops, waiting for your help to resolve it, would\n\"git cherry-pick --continue\" conclude it?\n\nIf that works then this definitely is a good change (the user only\nneeds to know \"cherry-pick --continue\").\n\n> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n> ---\n>  t/t7512-status-help.sh | 6 ++++--\n>  wt-status.c            | 6 ++++--\n>  2 files changed, 8 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\n> index bf08d4e..4f09bec 100755\n> --- a/t/t7512-status-help.sh\n> +++ b/t/t7512-status-help.sh\n> @@ -632,7 +632,8 @@ test_expect_success 'status when cherry-picking before resolving conflicts' '\n>  \tcat >expected <<-\\EOF &&\n>  \t# On branch cherry_branch\n>  \t# You are currently cherry-picking.\n> -\t#   (fix conflicts and run \"git commit\")\n> +\t#   (fix conflicts and run \"git cherry-pick --continue\")\n> +\t#   (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n>  \t#\n>  \t# Unmerged paths:\n>  \t#   (use \"git add <file>...\" to mark resolution)\n> @@ -655,7 +656,8 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '\n>  \tcat >expected <<-\\EOF &&\n>  \t# On branch cherry_branch\n>  \t# You are currently cherry-picking.\n> -\t#   (all conflicts fixed: run \"git commit\")\n> +\t#   (all conflicts fixed: run \"git cherry-pick --continue\")\n> +\t#   (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n>  \t#\n>  \t# Changes to be committed:\n>  \t#\n> diff --git a/wt-status.c b/wt-status.c\n> index bf84a86..438a40d 100644\n> --- a/wt-status.c\n> +++ b/wt-status.c\n> @@ -955,10 +955,12 @@ static void show_cherry_pick_in_progress(struct wt_status *s,\n>  \tif (advice_status_hints) {\n>  \t\tif (has_unmerged(s))\n>  \t\t\tstatus_printf_ln(s, color,\n> -\t\t\t\t_(\"  (fix conflicts and run \\\"git commit\\\")\"));\n> +\t\t\t\t_(\"  (fix conflicts and run \\\"git cherry-pick --continue\\\")\"));\n>  \t\telse\n>  \t\t\tstatus_printf_ln(s, color,\n> -\t\t\t\t_(\"  (all conflicts fixed: run \\\"git commit\\\")\"));\n> +\t\t\t\t_(\"  (all conflicts fixed: run \\\"git cherry-pick --continue\\\")\"));\n> +\t\tstatus_printf_ln(s, color,\n> +\t\t\t_(\"  (use \\\"git cherry-pick --abort\\\" to cancel the cherry-pick operation)\"));\n>  \t}\n>  \twt_status_print_trailer(s);\n>  }\n"},{"id":"221090","messageId":"CAN0XMOJhUA7Uut-jpnpSRW_E2xHARCyP_8FUmebNjBkm59v0JA@mail.gmail.com","threadId":"34170","inReplyTo":"7vppvkczqu.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] wt-status: give better advice when cherry-pick is in progress","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2013-06-17T19:29:04Z","receivedAt":"2013-06-17T19:29:04Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"2013/6/17 Junio C Hamano <gitster@pobox.com>:\n> Ralf Thielow <ralf.thielow@gmail.com> writes:\n>\n>> When cherry-pick is in progress, 'git status' gives the advice to\n>> run \"git commit\" to finish the cherry-pick. However, this won't continue\n>> the sequencer.\n>> \"git status\" should give the advice of running \"git cherry-pick --continue\"\n>> or \"git cherry-pick --abort\".\n>\n> Is the above _always_ the case, or does the updated advice message\n> only apply when you are cherry-picking a range of commits with \"git\n> cherry-pick A..B\"?  In other words, when \"git cherry-pick $it\" (a\n> single commit) stops, waiting for your help to resolve it, would\n> \"git cherry-pick --continue\" conclude it?\n>\n\nYes, both \"--continue\" and \"--abort\" works with a single commit.\n\n> If that works then this definitely is a good change (the user only\n> needs to know \"cherry-pick --continue\").\n>\n>> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n>> ---\n>>  t/t7512-status-help.sh | 6 ++++--\n>>  wt-status.c            | 6 ++++--\n>>  2 files changed, 8 insertions(+), 4 deletions(-)\n>>\n>> diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\n>> index bf08d4e..4f09bec 100755\n>> --- a/t/t7512-status-help.sh\n>> +++ b/t/t7512-status-help.sh\n>> @@ -632,7 +632,8 @@ test_expect_success 'status when cherry-picking before resolving conflicts' '\n>>       cat >expected <<-\\EOF &&\n>>       # On branch cherry_branch\n>>       # You are currently cherry-picking.\n>> -     #   (fix conflicts and run \"git commit\")\n>> +     #   (fix conflicts and run \"git cherry-pick --continue\")\n>> +     #   (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n>>       #\n>>       # Unmerged paths:\n>>       #   (use \"git add <file>...\" to mark resolution)\n>> @@ -655,7 +656,8 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '\n>>       cat >expected <<-\\EOF &&\n>>       # On branch cherry_branch\n>>       # You are currently cherry-picking.\n>> -     #   (all conflicts fixed: run \"git commit\")\n>> +     #   (all conflicts fixed: run \"git cherry-pick --continue\")\n>> +     #   (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n>>       #\n>>       # Changes to be committed:\n>>       #\n>> diff --git a/wt-status.c b/wt-status.c\n>> index bf84a86..438a40d 100644\n>> --- a/wt-status.c\n>> +++ b/wt-status.c\n>> @@ -955,10 +955,12 @@ static void show_cherry_pick_in_progress(struct wt_status *s,\n>>       if (advice_status_hints) {\n>>               if (has_unmerged(s))\n>>                       status_printf_ln(s, color,\n>> -                             _(\"  (fix conflicts and run \\\"git commit\\\")\"));\n>> +                             _(\"  (fix conflicts and run \\\"git cherry-pick --continue\\\")\"));\n>>               else\n>>                       status_printf_ln(s, color,\n>> -                             _(\"  (all conflicts fixed: run \\\"git commit\\\")\"));\n>> +                             _(\"  (all conflicts fixed: run \\\"git cherry-pick --continue\\\")\"));\n>> +             status_printf_ln(s, color,\n>> +                     _(\"  (use \\\"git cherry-pick --abort\\\" to cancel the cherry-pick operation)\"));\n>>       }\n>>       wt_status_print_trailer(s);\n>>  }\n"},{"id":"221100","messageId":"7vli68biip.fsf@alter.siamese.dyndns.org","threadId":"34170","inReplyTo":"CAN0XMOJhUA7Uut-jpnpSRW_E2xHARCyP_8FUmebNjBkm59v0JA@mail.gmail.com","subject":"Re: [PATCH] wt-status: give better advice when cherry-pick is in progress","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-17T20:15:58Z","receivedAt":"2013-06-17T20:15:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ralf Thielow <ralf.thielow@gmail.com> writes:\n\n> 2013/6/17 Junio C Hamano <gitster@pobox.com>:\n>> Ralf Thielow <ralf.thielow@gmail.com> writes:\n>>\n>>> When cherry-pick is in progress, 'git status' gives the advice to\n>>> run \"git commit\" to finish the cherry-pick. However, this won't continue\n>>> the sequencer.\n>>> \"git status\" should give the advice of running \"git cherry-pick --continue\"\n>>> or \"git cherry-pick --abort\".\n>>\n>> Is the above _always_ the case, or does the updated advice message\n>> only apply when you are cherry-picking a range of commits with \"git\n>> cherry-pick A..B\"?  In other words, when \"git cherry-pick $it\" (a\n>> single commit) stops, waiting for your help to resolve it, would\n>> \"git cherry-pick --continue\" conclude it?\n>>\n>\n> Yes, both \"--continue\" and \"--abort\" works with a single commit.\n\nPerhaps that is a good thing to explain, in addition to \"won't\ncontinue the sequencer\", as single-pick case does not have much to\ndo with it ;-)\n\nThanks, will queue.\n\n>> If that works then this definitely is a good change (the user only\n>> needs to know \"cherry-pick --continue\").\n>>\n>>> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n>>> ---\n>>>  t/t7512-status-help.sh | 6 ++++--\n>>>  wt-status.c            | 6 ++++--\n>>>  2 files changed, 8 insertions(+), 4 deletions(-)\n>>>\n>>> diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh\n>>> index bf08d4e..4f09bec 100755\n>>> --- a/t/t7512-status-help.sh\n>>> +++ b/t/t7512-status-help.sh\n>>> @@ -632,7 +632,8 @@ test_expect_success 'status when cherry-picking before resolving conflicts' '\n>>>       cat >expected <<-\\EOF &&\n>>>       # On branch cherry_branch\n>>>       # You are currently cherry-picking.\n>>> -     #   (fix conflicts and run \"git commit\")\n>>> +     #   (fix conflicts and run \"git cherry-pick --continue\")\n>>> +     #   (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n>>>       #\n>>>       # Unmerged paths:\n>>>       #   (use \"git add <file>...\" to mark resolution)\n>>> @@ -655,7 +656,8 @@ test_expect_success 'status when cherry-picking after resolving conflicts' '\n>>>       cat >expected <<-\\EOF &&\n>>>       # On branch cherry_branch\n>>>       # You are currently cherry-picking.\n>>> -     #   (all conflicts fixed: run \"git commit\")\n>>> +     #   (all conflicts fixed: run \"git cherry-pick --continue\")\n>>> +     #   (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)\n>>>       #\n>>>       # Changes to be committed:\n>>>       #\n>>> diff --git a/wt-status.c b/wt-status.c\n>>> index bf84a86..438a40d 100644\n>>> --- a/wt-status.c\n>>> +++ b/wt-status.c\n>>> @@ -955,10 +955,12 @@ static void show_cherry_pick_in_progress(struct wt_status *s,\n>>>       if (advice_status_hints) {\n>>>               if (has_unmerged(s))\n>>>                       status_printf_ln(s, color,\n>>> -                             _(\"  (fix conflicts and run \\\"git commit\\\")\"));\n>>> +                             _(\"  (fix conflicts and run \\\"git cherry-pick --continue\\\")\"));\n>>>               else\n>>>                       status_printf_ln(s, color,\n>>> -                             _(\"  (all conflicts fixed: run \\\"git commit\\\")\"));\n>>> +                             _(\"  (all conflicts fixed: run \\\"git cherry-pick --continue\\\")\"));\n>>> +             status_printf_ln(s, color,\n>>> +                     _(\"  (use \\\"git cherry-pick --abort\\\" to cancel the cherry-pick operation)\"));\n>>>       }\n>>>       wt_status_print_trailer(s);\n>>>  }\n"}]}