git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Steven E. Harris" <seh@panix.com>
To: git@vger.kernel.org
Subject: Re: How does Git's maintenance policy handle topics that don't start from "master?"
Date: Tue, 29 May 2012 17:51:53 -0400	[thread overview]
Message-ID: <m2sjei4pvq.fsf@Spindle.sehlabs.com> (raw)
In-Reply-To: 7vbol63ccs.fsf@alter.siamese.dyndns.org

Junio C Hamano <gitster@pobox.com> writes:

> It often is clear that the follow-on topic depends on an earlier topic
> branch (mostly because the contributor is aware of it and state it in
> the message).  An obvious thing to do in such a case is to create a
> new branch to queue that topic starting at the tip of the earlier
> topic.  Note that this is never from the tip of "next", as it is very
> unlikely that such a follow-on topic depends on everything that is not
> in "master" yet.

Thank you for the thorough reply.

I want to make sure that I understand the main hazard that the policy
aims to avoid. If an author bases a topic branch on the tip of "next,"
then, later, it will not be possible to merge his work to "master"
without implicitly accepting all of "next" (or, at least the part of
"next" the precedes this topic branch) into "master." We are trying to
avoid merging "upward" from "next" to "master" like that, and prefer to
take the topics to "master" directly rather than implicitly by way of
their inclusion in "next."

What isn't so clear to me, though, is /why/ this don't-merge-from-"next"
rule is so important. Say that we had one topic "t1" depart from "next,"
and then another topic "t2" depart from "t1," and both have been cooking
in "next," with good results.

  ---o---o---o---o  master
                  \
                   o---o---o---o---o---M---o---o next
                        \     /       /
                         o---o t1    /
                              \     /
                               o---o t2

If we wanted to graduate these two topics to "master," we /could/ merge
from commit M back to "master," though here I deliberately included the
nefarious commit X, which shows other interleaved contributions along
"next" that are also part of the M commit.

What about this case, where topics "t1" and "t2" did depart from
"master," and are doing well along "next" together as of commit M.

  ---o---o---o---o  master
      \   \       \
       \   o---o---o---M---o---o next
        \     /       /
         o---o t1    /
          \         /
           o---o---o t2

The Git policy as I understand it prescribes that we merge from the tips
of "t1" and "t2" back to master, not from a commit like M. What harm
would come from merging from M in this case? Future archaeology of topic
provenance?

-- 
Steven E. Harris

  reply	other threads:[~2012-05-29 21:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 20:33 How does Git's maintenance policy handle topics that don't start from "master?" Steven E. Harris
2012-05-29 21:24 ` Steven E. Harris
2012-05-29 21:29 ` Junio C Hamano
2012-05-29 21:51   ` Steven E. Harris [this message]
2012-05-29 23:06     ` Junio C Hamano
2012-05-29 23:16       ` Junio C Hamano

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=m2sjei4pvq.fsf@Spindle.sehlabs.com \
    --to=seh@panix.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).