From: Nix <nix@esperi.org.uk>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: What's the meaning of `parenthood' in git commits?
Date: Wed, 08 Nov 2006 01:36:15 +0000 [thread overview]
Message-ID: <87zmb2afe8.fsf@hades.wkstn.nix> (raw)
In-Reply-To: <7vy7qmyc46.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Tue, 07 Nov 2006 17:13:13 -0800")
On 8 Nov 2006, Junio C. Hamano spake thusly:
> Nix <nix@esperi.org.uk> writes:
>
>> The idea being that if you have a tree like this:
>>
>> B
>> ------------- ref trunks/latest
>> \
>> ------ ref heads/some-change-foo
>>
>> ... -------- ref trunks/old-and-grotty
>>
>>
>> then this merge strategy, when asked to merge heads/some-change-foo into
>> trunks/old-and-grotty would spot that point B was the most recent
>> merge point into anything in trunks/, generate a diff between point B
>> and heads/some-change-foo, and patch it into trunks/old-and-grotty.
>
> This is a standard "cherry-picking" practice.
Yes, pretty much, except that we do *everything* by cherry-picking, and
we want to track the cherry-picks in the same way that all other changes
are tracked (i.e., a small branch for each (numbered) change, patching
madly in all directions into a variety of trunks and release branches,
with all those patches tracked.)
> These commits I list as its parents of this new commit, and
> everything that leads to them, are what I considered when
> derived this commit. This new child commit of them suits the
> purpose of _my_ branch better than any of these parent
> commits I took into consideration because of such and such
> reasons that I stated in its commit log message.
>
> If you mark the resulting commit on old-and-grotty to have
> some-change-foo as one of its parents, because some-change-foo
> has almost everything 'latest' has (up to point B), you are also
> saying "I have considered everything that happened between
> old-and-grotty and B when making this commit".
Yeah. This is the merge-base tracking that Linus mentioned, and it's not
quite what I'm looking for :/ it's a sort of step-parent, really...
> What's implied by that statement is this, even though you do not
> explicitly say:
>
> I reject everything that happened on the development line
> that led to 'latest' up to point B since old-and-grotty was
> forked.
(which is not necessarily true: we might want to backport an earlier
change, also on another `small change branch', later on. Stuff on the
trunks themselves will never want to get backported, but if the
merge-base algorithm traverses patch-merge parent links, it might
consider that a `small change branch' has been merged when it actually
hasn't.)
> This is not necessarily a bad thing, by the way. For somebody
> who is trying to maintain extremely-stable branch by cherry
> picking only changes in a few narrow areas from the mainline
> would _want_ to leave most of the "new good stuff" out from his
> branch. That's why I emphasized _my_ a few paragraphs above.
That's exactly what we're doing, across-the-board.
> But it is _so_ different from the mindset of usual "every branch
> makes progress _forward_ perhaps with different pace". In this
> example, this branch is actively choosing to stay behind and
> refusing to take changes from the 'latest'. So your users need
> to really understand what they are doing.
*hahahaaaaa*... hang on, that *was* a joke, right? ;)
> So I think as long as you and your users understand what is
> going on, I do not see a problem at either the mechanical level
> or the philosophical level. But I am sure it would confuse a
> lot of people, so please do not come back complaining that you
> ended up getting your users heads explode ;-).
OK, I think I need to find a way to notate in the patch-merged commit
that one or more parents should be disregarded when searching for merge
bases (and *only* when searching for merge bases). I think that will
do what's wanted in all areas: i.e., it'll act like a cherry-pick
that shows up in the logs/revlist and so on, but doesn't affect the
semantics of later merges of stuff from anywhere except for the
same limited branch.
(obviously trying to patch-merge B to A twice is always going to
fail, whether or not merge-base traversal jumps into B: I don't
think there's any real need to protect against that.)
--
Rich industrial heritage: lifeless wasteland. `The land
prev parent reply other threads:[~2006-11-08 1:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-08 0:39 What's the meaning of `parenthood' in git commits? Nix
2006-11-08 0:52 ` Jakub Narebski
2006-11-08 0:58 ` Linus Torvalds
2006-11-08 1:28 ` Nix
2006-11-08 3:04 ` Nix
2006-11-08 1:13 ` Junio C Hamano
2006-11-08 1:36 ` Nix [this message]
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=87zmb2afe8.fsf@hades.wkstn.nix \
--to=nix@esperi.org.uk \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).