From: Junio C Hamano <gitster@pobox.com>
To: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH 0/1] rebase --onto detection of already applied commits
Date: Tue, 13 Dec 2022 09:13:29 +0900 [thread overview]
Message-ID: <xmqqlencqhxy.fsf@gitster.g> (raw)
In-Reply-To: <20221212113516.27816-1-cristian.ciocaltea@collabora.com> (Cristian Ciocaltea's message of "Mon, 12 Dec 2022 13:35:15 +0200")
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> writes:
> Let's consider the following operation:
>
> git rebase --onto new-base upstream feature
>
> where 'feature' contains a few commits on top of 'upstream' which need to be
> rebased onto 'new-base'.
Isn't it what "git rebase new-base feature" for? "My 'feature'
forked from where 'new-base' came from but they updated 'new-base'
so I do not know if some of what I had in my 'feature' is in
theirs. Please forward port what is still left in 'feature' on top
of updated 'new-base' that I just got from them".
The primary reason why we have an explicit "--onto" is so that
"rebase" is used just like
git checkout --detach new-base
git cherry-pick upstream..feature
git checkout -B feature
to deal with a different situation, i.e. "My 'feature' forked from
'upstream', and I have a commit 'new-base'. Just transplant the
whole thing on top of it", without having to worry about "what is
already in new-base?" at all. After all, 'new-base' may not have
ANY ancestry relationship with the 'upstream', so "inspect commits
in the range upstream..new-base to exclude those that are the same
as the ones in upstream..feature" is not a well defined operation.
next prev parent reply other threads:[~2022-12-13 0:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 11:35 [RFC PATCH 0/1] rebase --onto detection of already applied commits Cristian Ciocaltea
2022-12-12 11:35 ` [RFC PATCH 1/1] rebase --onto: Skip previously " Cristian Ciocaltea
2022-12-12 12:27 ` Ævar Arnfjörð Bjarmason
2022-12-12 15:37 ` Cristian Ciocaltea
2022-12-13 0:13 ` Junio C Hamano [this message]
2022-12-13 10:37 ` [RFC PATCH 0/1] rebase --onto detection of already " Cristian Ciocaltea
2022-12-13 12:38 ` Junio C Hamano
2022-12-13 13:04 ` Phillip Wood
2022-12-13 15:34 ` Cristian Ciocaltea
2022-12-15 15:40 ` Phillip Wood
2022-12-15 16:02 ` Cristian Ciocaltea
2022-12-15 17:07 ` Phillip Wood
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=xmqqlencqhxy.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=cristian.ciocaltea@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.