<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git/git-merge-octopus.sh, branch mh/update-ref-errors</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/'/>
<entry>
<title>merge-octopus: abort if index does not match HEAD</title>
<updated>2016-04-13T01:39:43+00:00</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2016-04-10T06:13:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=3ec62ad9ffba2476e30fdf8e8717756fe62119f9'/>
<id>3ec62ad9ffba2476e30fdf8e8717756fe62119f9</id>
<content type='text'>
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>merge-octopus: Work around environment issue on Windows</title>
<updated>2010-10-01T22:08:46+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2010-06-11T22:45:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=4e57bafe8bc60e35b9841b22f99882581c466daf'/>
<id>4e57bafe8bc60e35b9841b22f99882581c466daf</id>
<content type='text'>
For some reason, the environment variables get upper-cased when a
subprocess is launched on Windows. Cope with that.

[PT: fixed typo in the char range noted by junio]

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For some reason, the environment variables get upper-cased when a
subprocess is launched on Windows. Cope with that.

[PT: fixed typo in the char range noted by junio]

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>octopus: remove dead code</title>
<updated>2009-12-14T07:40:24+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-12-12T00:38:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=f08aa017675bffe2359e0122cff2e447486b97c1'/>
<id>f08aa017675bffe2359e0122cff2e447486b97c1</id>
<content type='text'>
MSG, PARENT, and CNT are never used, just assigned to.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MSG, PARENT, and CNT are never used, just assigned to.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>octopus: reenable fast-forward merges</title>
<updated>2009-12-14T07:40:24+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-12-12T00:38:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=85bf49f9a55fd9ded396460d245a55b651d7bdaa'/>
<id>85bf49f9a55fd9ded396460d245a55b651d7bdaa</id>
<content type='text'>
The fast-forward logic is never being triggered because $common and
$MRC are never equivalent. $common is initialized to a commit id by
merge-base and MRC is initialized to HEAD. Fix this by initializing
$MRC to the commit id for HEAD so that its possible for $MRC and
$common to be equal.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fast-forward logic is never being triggered because $common and
$MRC are never equivalent. $common is initialized to a commit id by
merge-base and MRC is initialized to HEAD. Fix this by initializing
$MRC to the commit id for HEAD so that its possible for $MRC and
$common to be equal.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>octopus: make merge process simpler to follow</title>
<updated>2009-12-14T07:17:46+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-12-12T00:38:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=81334502eed1c78f49fc74936b712b3cf32b682a'/>
<id>81334502eed1c78f49fc74936b712b3cf32b682a</id>
<content type='text'>
Its not very easy to understand what heads are being merged given
the current output of an octopus merge. Fix this by replacing the
sha1 with the (usually) better description in GITHEAD_&lt;SHA1&gt;.

Suggested-by: Jari Aalto &lt;jari.aalto@cante.net&gt;
Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Its not very easy to understand what heads are being merged given
the current output of an octopus merge. Fix this by replacing the
sha1 with the (usually) better description in GITHEAD_&lt;SHA1&gt;.

Suggested-by: Jari Aalto &lt;jari.aalto@cante.net&gt;
Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>git-merge-octopus: use (merge-base A (merge B C D E...)) for stepwise merge</title>
<updated>2008-07-30T07:20:51+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-07-27T20:47:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=c5dc9a28298afb75d2be6b212d420fc89c258aa0'/>
<id>c5dc9a28298afb75d2be6b212d420fc89c258aa0</id>
<content type='text'>
Suppose you have this topology, and you are trying to make an octopus
across A, B and C (you are at C and merging A and B into your branch).
The protoccol between "git merge" and merge strategies is for the former
to pass common ancestor(s), '--' and then commits being merged.

git-merge-octopus does not produce the final merge in one-go.  It
iteratively produces pairwise merges.  So the first step might be to come
up with a merge between B and C:

               o---o---o---o---C
              /                 :
             /   o---o---o---B..(M)
            /   /
        ---1---2---o---o---o---A

and for that, "1" is used as the merge base, not because it is the base
across A, B and C but because it is the base between B and C.  For this
merge, A does not matter.

I drew M in parentheses and lines between B and C to it in dotted line
because we actually do _not_ create a real commit --- the only thing we
need is a tree object, in order to proceed to the next step.

Then the final merge result is obtained by merging tree of (M) and A using
their common ancestor.  For that, we _could_ still use "1" as the merge
base.

But if you imagine a case where you started from A and M, you would _not_
pick "1" as the merge base; you would rather use "2" which is a better
base for this merge.

That is why git-merge-octopus ignores the merge base given by "merge" but
computes its own.

The comment at the end of git-merge-octopus talks about "merge reference
commit", that we used to update it to common found in this round, and that
that updating was pointless.  After the first round of merge to produce
the tree for M (but without actually creating the commit object M itself),
in order to figure out the merge base used to merge that with A in the
second round, we used to use A and "1" (which was merge base between B and
C).  That was pointless --- "merge-base A 1" is guaranteed to give a base
that is no better than either "merge-base A B" or "merge-base A C".  So
the current code keeps using the original head (iow, MRC=C, because in
this case we are starting from C and merging B and then A into it).

This trickerly was necessary only because we avoided creating the extra
merge commit object M.

	Side note.  An alternative implementation could have been to
	actually record it as a real merge commit M, and then let the
	two-commit merge-base compute the base between A and M when
	merging A to the result of the previous round, but we avoided
	creating M, at the expense of potentially using suboptimal base in
	the later rounds.

But we do not have to be that pessimistic.  We can instead accumulate the
commits we have merged so far in MRC, and have merge_bases_many() compute
the merge base for the new head being merged and the heads we have
processed so far, which can give a better base than what we currently do.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suppose you have this topology, and you are trying to make an octopus
across A, B and C (you are at C and merging A and B into your branch).
The protoccol between "git merge" and merge strategies is for the former
to pass common ancestor(s), '--' and then commits being merged.

git-merge-octopus does not produce the final merge in one-go.  It
iteratively produces pairwise merges.  So the first step might be to come
up with a merge between B and C:

               o---o---o---o---C
              /                 :
             /   o---o---o---B..(M)
            /   /
        ---1---2---o---o---o---A

and for that, "1" is used as the merge base, not because it is the base
across A, B and C but because it is the base between B and C.  For this
merge, A does not matter.

I drew M in parentheses and lines between B and C to it in dotted line
because we actually do _not_ create a real commit --- the only thing we
need is a tree object, in order to proceed to the next step.

Then the final merge result is obtained by merging tree of (M) and A using
their common ancestor.  For that, we _could_ still use "1" as the merge
base.

But if you imagine a case where you started from A and M, you would _not_
pick "1" as the merge base; you would rather use "2" which is a better
base for this merge.

That is why git-merge-octopus ignores the merge base given by "merge" but
computes its own.

The comment at the end of git-merge-octopus talks about "merge reference
commit", that we used to update it to common found in this round, and that
that updating was pointless.  After the first round of merge to produce
the tree for M (but without actually creating the commit object M itself),
in order to figure out the merge base used to merge that with A in the
second round, we used to use A and "1" (which was merge base between B and
C).  That was pointless --- "merge-base A 1" is guaranteed to give a base
that is no better than either "merge-base A B" or "merge-base A C".  So
the current code keeps using the original head (iow, MRC=C, because in
this case we are starting from C and merging B and then A into it).

This trickerly was necessary only because we avoided creating the extra
merge commit object M.

	Side note.  An alternative implementation could have been to
	actually record it as a real merge commit M, and then let the
	two-commit merge-base compute the base between A and M when
	merging A to the result of the previous round, but we avoided
	creating M, at the expense of potentially using suboptimal base in
	the later rounds.

But we do not have to be that pessimistic.  We can instead accumulate the
commits we have merged so far in MRC, and have merge_bases_many() compute
the merge base for the new head being merged and the heads we have
processed so far, which can give a better base than what we currently do.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite "git-frotz" to "git frotz"</title>
<updated>2007-07-03T05:52:14+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-07-03T05:52:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=5be60078c935ed08ee8eb5a32680bdfb6bb5bdf3'/>
<id>5be60078c935ed08ee8eb5a32680bdfb6bb5bdf3</id>
<content type='text'>
This uses the remove-dashes target to replace "git-frotz" to "git frotz".

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses the remove-dashes target to replace "git-frotz" to "git frotz".

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>read-tree --aggressive</title>
<updated>2006-02-07T05:43:27+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-02-04T06:04:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=1b1fdf8c2f935e2195d3ca5c37e578bd9146a82f'/>
<id>1b1fdf8c2f935e2195d3ca5c37e578bd9146a82f</id>
<content type='text'>
A new flag --aggressive resolves what we traditionally resolved
with external git-merge-one-file inside index while read-tree
3-way merge works.

git-merge-octopus and git-merge-resolve use this flag before
running git-merge-index with git-merge-one-file.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A new flag --aggressive resolves what we traditionally resolved
with external git-merge-one-file inside index while read-tree
3-way merge works.

git-merge-octopus and git-merge-resolve use this flag before
running git-merge-index with git-merge-one-file.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>octopus: allow manual resolve on the last round.</title>
<updated>2006-01-15T01:21:38+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-01-14T00:45:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=98efc8f3d890a0c671b7e2000e43b2e0a96b9a73'/>
<id>98efc8f3d890a0c671b7e2000e43b2e0a96b9a73</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>octopus: allow criss-cross and clarify the message when it rejects</title>
<updated>2006-01-13T09:40:16+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-01-13T09:37:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=c884dd9a54fcde71ea125c86e6b6ab92acbbc7cf'/>
<id>c884dd9a54fcde71ea125c86e6b6ab92acbbc7cf</id>
<content type='text'>
We rejected multi-base merge situations even though we used the
same underlying multi-base git-read-tree as the resolve strategy
uses.  This was unneeded and did not add much to ensure the
merge to be truly trivial, so remove this restriction and be
more similar to what resolve does.

Also when the merge did not trivially resolve, we rejected
without stating that octopus strategy does not handle the
situation.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We rejected multi-base merge situations even though we used the
same underlying multi-base git-read-tree as the resolve strategy
uses.  This was unneeded and did not add much to ensure the
merge to be truly trivial, so remove this restriction and be
more similar to what resolve does.

Also when the merge did not trivially resolve, we rejected
without stating that octopus strategy does not handle the
situation.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
