git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] wt-status: give better advice when cherry-pick is in progress

From
Ralf Thielow <ralf.thielow@gmail.com>
Date
Jun 17, 2013, 19:29 UTC
Message-ID
<CAN0XMOJhUA7Uut-jpnpSRW_E2xHARCyP_8FUmebNjBkm59v0JA@mail.gmail.com>
In-Reply-To
<7vppvkczqu.fsf@alter.siamese.dyndns.org>
2013/6/17 Junio C Hamano <gitster@pobox.com>:
Show 14 quoted lines
> Ralf Thielow <ralf.thielow@gmail.com> writes:
>
>> 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.
>> "git status" should give the advice of running "git cherry-pick --continue"
>> or "git cherry-pick --abort".
>
> Is the above _always_ the case, or does the updated advice message
> only apply when you are cherry-picking a range of commits with "git
> cherry-pick A..B"?  In other words, when "git cherry-pick $it" (a
> single commit) stops, waiting for your help to resolve it, would
> "git cherry-pick --continue" conclude it?
>
Yes, both "--continue" and "--abort" works with a single commit.
Show 52 quoted lines
> If that works then this definitely is a good change (the user only
> needs to know "cherry-pick --continue").
>
>> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
>> ---
>>  t/t7512-status-help.sh | 6 ++++--
>>  wt-status.c            | 6 ++++--
>>  2 files changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh
>> index bf08d4e..4f09bec 100755
>> --- a/t/t7512-status-help.sh
>> +++ b/t/t7512-status-help.sh
>> @@ -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:
>>       #
>> diff --git a/wt-status.c b/wt-status.c
>> index bf84a86..438a40d 100644
>> --- a/wt-status.c
>> +++ b/wt-status.c
>> @@ -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);
>>  }
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “wt-status: give better advice when cherry-pick is in progress”
  1. wt-status: give better advice when cherry-pick is in progressRalf Thielow, Jun 17, 2013
  2. Junio C HamanoJun 17, 2013
  3. Ralf ThielowJun 17, 2013
  4. Junio C HamanoJun 17, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.