From: Junio C Hamano <gitster@pobox.com>
To: Edmundo Carmona Antoranz <eantoranz@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC] sequencer: allow metadata to be saved if using cherry-pick --no-commit
Date: Wed, 21 Oct 2020 13:41:28 -0700 [thread overview]
Message-ID: <xmqqa6wf71mv.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <xmqqv9f37476.fsf@gitster.c.googlers.com> (Junio C. Hamano's message of "Wed, 21 Oct 2020 12:46:05 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> 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
next prev parent reply other threads:[~2020-10-21 20:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 6:24 [RFC] sequencer: allow metadata to be saved if using cherry-pick --no-commit Edmundo Carmona Antoranz
2020-10-21 6:31 ` Edmundo Carmona Antoranz
2020-10-21 16:12 ` Taylor Blau
2020-10-21 18:04 ` Edmundo Carmona Antoranz
2020-10-21 19:46 ` Junio C Hamano
2020-10-21 20:41 ` Junio C Hamano [this message]
2020-10-21 20:45 ` Edmundo Carmona Antoranz
2020-10-21 20:53 ` Edmundo Carmona Antoranz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa6wf71mv.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=eantoranz@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).