Pure merges

John Arbash Meinel john at arbash-meinel.com
Wed May 7 19:13:55 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stefan Monnier wrote:
| While reading the "Workflows, rebase, patch theory" thread, I was brough
| again to think about the issue of "pure merges".
|
| Just like in Arh, Bazaar's merge-commits can contain anything: ideally,
| they only contain the actual merge plus just some conflict resolution,
| but the user is free to actually include anything she wants in there,
| including replacing the tree with something completely different.
|
| So when doing cherrypicking and merging, Bazaar (just like Arch) cannot
| just assume that the merge-commit is equal to the sum of the patches that
| were merged.
|
| So I suggest the following:
|
| A merge-commit should be composed of not just 1 but 2 revisions: the
| first is the pure merge and contains the tree in the state after the
| "bzr merge" command (i.e. it may contain conflict markers and things
| like that).  The second contains the changes the user made to resolve
| the conflict (and/or any other change she felt like including in that
| commit).
|
|
|         Stefan

Why?

The content of that revision is then heavily dependent on what merge algorithm
was used (--weave, --merge3 --reprocess, --lca, etc). It doesn't give you a
chance to "remerge" with different options, etc.

What is the advantage of a "pure merge"? AFAIK you don't have it in git either,
because you have "commit --amend". I don't know exactly how that works, but my
understanding is that it replaced your existing commit with a new one. Which
means that you might *think* it is a pure merge, but it has actually been amended.

Certainly creating a commit with conflict markers seems a bit odd. Especially
considering the "bisect through revisions" thread.

If you have a specific use case for it, I'm willing to entertain the thought. I
just don't see what it actually adds.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgh8WMACgkQJdeBCYSNAAPimgCfeMXmk3yjhdQ8UPYTgXad/bso
/WwAn2kTFt8D31OtvmWW61V7t4zkA8Zm
=EUT5
-----END PGP SIGNATURE-----



More information about the bazaar mailing list