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

Re: [RFC] sequencer: allow metadata to be saved if using cherry-pick --no-commit

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 21, 2020, 20:41 UTC
Message-ID
<xmqqa6wf71mv.fsf@gitster.c.googlers.com>
In-Reply-To
<xmqqv9f37476.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 21 quoted lines
> Before dismissing the idea totally, let's see what potential use
> cases this change _could_ benefit, and see if there are already ways
> to satisfy these use cases without making this change.  For example,
> if the user wants to examine the result before actually "committing"
> to move the target branch forward with this change, keeping it an
> option to back out if the result of cherry-picking turns out to be
> bad, the "--no-commit first, examine, and --continue or --abort"
> sequence may help such a workflow.
>
> But the user can already do so without this change:
>
>     $ git checkout target_branch^0 ;#detach
>     $ git cherry-pick source_branch
>     ... examine the result ...
>     ... and if it is satisfactory ...
>     $ git checkout -B target_branch
>     ... or if it is not, then discard ...
>     $ git checkout target_branch
>
>> With this patch, we allow sequencer to save the metadata from the original
>> cherry-pick operation so that 'git cherry-pick --continue' can be called.

And if the user wants to do the inspection while on the target branch, "commit -c/-C" is the perfect choice.

    $ git cherry-pick --no-commit source_branch
    ... examine the result ...
    ... and if it is satisfactory ...
    $ git commit -c source_branch
    ... or if it is not, then discard ...
    $ git reset --hard
Previous: Junio C HamanoNext: Edmundo Carmona Antoranz
Message 6 of 8 in “[RFC] sequencer: allow metadata to be saved if using cherry-pick --no-commit”
  1. Edmundo Carmona AntoranzOct 21, 2020
  2. Edmundo Carmona AntoranzOct 21, 2020
  3. Taylor BlauOct 21, 2020
  4. Edmundo Carmona AntoranzOct 21, 2020
  5. Junio C HamanoOct 21, 2020
  6. Junio C HamanoOct 21, 2020
  7. Edmundo Carmona AntoranzOct 21, 2020
  8. Edmundo Carmona AntoranzOct 21, 2020

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.