Re: [RFC] cherry-pick using multiple parents to implement -x

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Stephen R. van den Berg <srb@...>
Cc: <git@...>
Date: Sunday, September 7, 2008 - 1:28 pm

"Stephen R. van den Berg" <srb@cuci.nl> writes:

In general, I do not think what you did is a good idea.  The _only_ case
you can do what you did and keep your sanity is if you cherry-picked every
single commit that matters from one branch to the other.

If something is not "parent", you shouldn't be recording it as such.

Remember, when you are making a commit on top of one or more parents, you
are making this statement:

 * I have considered all histories leading to these parent commits, and
   based on that I decided that the tree I am recording as a child of
   these parents suits the purpose of my branch better than any of them.

This applies to one-parent case as well.

Imagine you have two histories, forked long time ago, and have side-port
of one commit:

             o---...o---B---A
            /
        ---o---o---...o---X---A'

What side-porting A from the top history to create A' in the bottom
history means is that the change between B and A in the top history, and
no other change from the top history, is applied on top of X to produce
state A' in the bottom history.  What B did is not included in the bottom
history.

If you recorded A' with parents A and X.  Here is what you would get:

             o---...o---B---A
            /                \ (wrong)
        ---o---o---...o---X---A'

But that is not what you did.  The tree state A' lacks what B did, which
could be a critical security fix, and you didn't consider all history that
leads to A when you cherry-picked it to create A'.

To put it another way, having the parent link from A' to A is a statement
that A' is a superset of A.  Because A contains B, you are claiming A'
also contains B, which is not the case in your cherry-picked history.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] cherry-pick using multiple parents to implement -x, Stephen R. van den Berg, (Sun Sep 7, 6:34 am)
Re: [RFC] cherry-pick using multiple parents to implement -x, Stephen R. van den Berg, (Mon Sep 8, 7:51 am)
Re: [RFC] cherry-pick using multiple parents to implement -x, Shawn O. Pearce, (Mon Sep 8, 10:38 am)
Re: [RFC] cherry-pick using multiple parents to implement -x, Stephen R. van den Berg, (Mon Sep 8, 10:58 am)
Re: [RFC] cherry-pick using multiple parents to implement -x, Shawn O. Pearce, (Mon Sep 8, 11:00 am)
Re: [RFC] cherry-pick using multiple parents to implement -x, Stephen R. van den Berg, (Tue Sep 9, 4:51 am)
Re: [RFC] cherry-pick using multiple parents to implement -x, Stephen R. van den Berg, (Mon Sep 8, 9:42 am)
Re: [RFC] cherry-pick using multiple parents to implement -x, Junio C Hamano, (Sun Sep 7, 1:28 pm)
Re: [RFC] cherry-pick using multiple parents to implement -x, Stephen R. van den Berg, (Sun Sep 7, 4:10 pm)
Re: [RFC] cherry-pick using multiple parents to implement -x, Stephen R. van den Berg, (Sun Sep 7, 3:56 pm)
Re: [RFC] cherry-pick using multiple parents to implement -x, Stephen R. van den Berg, (Sun Sep 7, 4:22 pm)
Re: [RFC] cherry-pick using multiple parents to implement -x, Stephen R. van den Berg, (Mon Sep 8, 2:57 am)