git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sverre Hvammen Johansen" <hvammen@gmail.com>
To: "Jakub Narebski" <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH Second draft] Fast forward strategies allow, never, and only
Date: Tue, 18 Mar 2008 22:20:56 -0800	[thread overview]
Message-ID: <402c10cd0803182320k134116cas5f62389482f2650a@mail.gmail.com> (raw)
In-Reply-To: <m363vkvvzb.fsf@localhost.localdomain>

Thanks to you and everyone else for useful input.  Some of this input
ended up in the documentation.  I will provide an updated patch
tomorrow.  I expect to have a final patch for submission some time
next week.

I have added some more documentation:


diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index 2af33d8..5af5436 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -36,7 +36,7 @@ include::merge-options.txt[]
 <remote>::
        Other branch head merged into our branch.  You need at
        least one <remote>.  Specifying more than one <remote>
-       obviously means you are trying an Octopus.
+       usually means you are trying an Octopus.


 include::fast-forward-options.txt[]
@@ -133,6 +133,47 @@ merge (which is typically a fraction of the whole
tree), you can
 have local modifications in your working tree as long as they do
 not overlap with what the merge updates.

+If more than one commit are specified for the merge, git will try to
+reduce the number of commits (real parents) by eliminating commits
+than can be reached from other commits.  The commit message will
+reflect the actual commits specified but the merge strategy will be
+selected based on the real parents always including `HEAD`.  The real
+parents (only including `HEAD` if it is real) are the parents recorded
+in the merge commit object.
+
+The following shows master and three topic branches.  TopicB is based
+on TopicA, TopicA is previously branched off from master, and TopicC
+is based on the current `HEAD` of master:
+
+------------
+                    o---o---o  TopicB
+                   /
+          o---o---o  TopicA
+         /
+    o---o---o---o---o---o  master
+                         \
+                          o---o  TopicC
+------------
+
+A merger of master with TopicA, TopicB, and TopicC will select the
+merge strategy based on the three branches master, TopicB, and TopicC
+(TopicA is eliminated since it can be reached from TopicB).  TopicB
+and TopicC are the only real parents and are therefore the only
+parents recorded in the merge commit object:
+
+------------
+         % git co master
+         % git merge TopicA TopicB TopicC
+
+                    o---o---o  TopicB
+                   /         \
+          o---o---o  TopicA   \
+         /                     \
+    o---o---o---o---o---o       o  master
+                         \     /
+                          o---o  TopicC
+------------
+
 When there are conflicts, these things happen:

 1. `HEAD` stays the same.

On Tue, Mar 18, 2008 at 8:27 AM, Jakub Narebski <jnareb@gmail.com> wrote:
>  I'd mention here receive.denyNonFastForward option as a way to set
>  this globally for all branches, for public bare publishing
>  repositories; AFAIK for push and I think also for fetch.

The denyNonFastForward option have nothing to do with merges.  It only
applies to push on the server side.  A merge is not involved when
doing a push.

-- 
Sverre Hvammen Johansen

  reply	other threads:[~2008-03-19 20:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11  2:59 [RFC/PATCH] Fast forward strategies allow, never, and only Sverre Hvammen Johansen
2008-03-11  3:18 ` Sverre Hvammen Johansen
2008-03-11  5:17   ` Ping Yin
2008-03-11  6:19 ` Junio C Hamano
2008-03-12  5:46   ` Sverre Hvammen Johansen
2008-03-16  6:44     ` Sverre Hvammen Johansen
2008-03-14  2:35   ` Sverre Hvammen Johansen
2008-03-11  9:15 ` Jakub Narebski
2008-03-12  4:24   ` Sverre Hvammen Johansen
2008-03-12  4:50     ` Junio C Hamano
2008-03-12  5:51       ` Sverre Hvammen Johansen
2008-03-18  4:27 ` [RFC/PATCH Second draft] " Sverre Hvammen Johansen
2008-03-18 13:57   ` Ping Yin
2008-03-18 15:58     ` Sverre Hvammen Johansen
2008-03-18 14:12   ` Jon Loeliger
2008-03-18 16:27   ` Jakub Narebski
2008-03-19  6:20     ` Sverre Hvammen Johansen [this message]
2008-03-19 21:20       ` Jakub Narebski
2008-03-20  4:44         ` Sverre Hvammen Johansen
2008-03-19 20:35   ` Junio C Hamano
2008-03-20  6:47     ` Sverre Hvammen Johansen
2008-03-22 19:49       ` Junio C Hamano
2008-03-26  3:50         ` Sverre Hvammen Johansen
2008-03-31  4:19           ` Sverre Hvammen Johansen
2008-04-20  1:06             ` [PATCH] " Sverre Hvammen Johansen
2008-04-22  7:48               ` Junio C Hamano
2008-04-24  5:39                 ` [PATCH 0/5] " Sverre Hvammen Johansen

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=402c10cd0803182320k134116cas5f62389482f2650a@mail.gmail.com \
    --to=hvammen@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /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).