emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: Git merge tool for Org files
Date: Sat, 20 Aug 2011 21:08:11 +0200	[thread overview]
Message-ID: <878vqnrjdw.fsf@Rainer.invalid> (raw)
In-Reply-To: 2DC59D99-FACF-40A2-9914-182C6224BD76@gmail.com

Carsten Dominik <carsten.dominik@gmail.com> writes:
> One of the obstacle for using Org-mode for collaborative programs is
> that many operations add or remove text from the beginning or end of a
> file, or which add or remove a subnode from an outline tree.

On of the things that I think would be necessary is a way to put an Org
document into a "normalized" representation and then evaluate the
differences between two of these.  The generic exporter started by
Bastien could probably deliver such a representation.

> These are operations that confuse the git merger, in particular
> if two people have added something to a file, or removed/added
> sequential sibling nodes.

Git merge only works reasonably well for program code (and only if
there's no changelog stuff inside the file).  The merge driver
functionality is there to solve that problem for when you _can_ be
smarter.  It is absolutely not necessary to write that driver in any
particular language, all that git does is to call the driver with three
versions of the same file as the argument.

> I believe that this could be solved with a dedicated merge driver
> that understands the integrity of an outline (sub)tree, and that
> knows that the sequence of two new subtrees added by different people
> does not matter.

You ask a potentially very big question here, this should be constrained
to keep it manageable.  I think a reasonable strategy is to merge two
Org documents "from the outside in", that is starting with the topmost
tree elements.  If you are merging at the tree level, anything inside
the tree should not matter at all.  I'm not sure the sequence doesn't
matter, but that can hardly be decided by the merge driver unless it
figures out how to sort elements of a tree.  The second step would then
be to check the leaf nodes of the tree for concurrent changes, which
probably still need to be resolved manually.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

      parent reply	other threads:[~2011-08-20 19:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18 10:45 Git merge tool for Org files Carsten Dominik
2011-08-20 14:17 ` Andrea Crotti
2011-08-20 14:42   ` Carsten Dominik
2011-08-20 14:56     ` Andrea Crotti
2011-08-20 16:04   ` Nick Dokos
2011-08-20 17:30     ` suvayu ali
2011-08-20 19:08 ` Achim Gratz [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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878vqnrjdw.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).