git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Sam Vilain <sam@vilain.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: n-heads and patch dependency chains
Date: Tue, 04 Apr 2006 12:05:55 +0100	[thread overview]
Message-ID: <tnxzmj1ppm4.fsf@arm.com> (raw)
In-Reply-To: <4430D352.4010707@vilain.net> (Sam Vilain's message of "Mon, 03 Apr 2006 19:48:34 +1200")

Sam Vilain <sam@vilain.net> wrote:
> "Patch dependency chains", the best plain-English term we could find for
> the scary sounding darcs term "patch calculus", are said by some to be a
> very good reason to use a system like darcs, even to some its
> fundamental advantage over systems such as git.

As Linus pointed out, while darcs theory is interesting, it doesn't
work properly in practice. Dependency tracking can create problems
with merging. Darcs' patch commuting theory has (a big, IMHO) problem
since every time you pull a patch (or more) it needs to commute all
the patches back to the common ancestor. Over time, the merging
becomes slower and slower (i.e. even much slower than what darcs shows
in simple tests with the Linux kernel).

Inexact patch commuting can be achieved using diff3 (or merge) with 3
snapshots of the tree (the bottom of the patch, the top of the patch
and the current head on top of which the patch is being applied) which
GIT handles very well and fast since there is no need to commute
thousands of patches back to the common ancestor. The slight
disadvantage is that diff3 merging is not as exact as Darcs' patch
commuting but OK for 99% of the real cases.

StGIT is based on this inexact patch commuting "theory" and, with the
addition of upstream merging detection (based on reverse-applying), it
is seems to behave properly in almost all the cases (though you can
deliberately create some patches to break the algorithm).

I've been thinking about adding patch dependency tracking to StGIT but
only as a recommendation and not enforcement. The algorithm would be
similar to the upstream merging detection.

-- 
Catalin

  parent reply	other threads:[~2006-04-04 11:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-03  7:48 n-heads and patch dependency chains Sam Vilain
2006-04-03 14:29 ` Linus Torvalds
2006-04-03 15:38   ` Sam Vilain
2006-04-03 19:37 ` Junio C Hamano
2006-04-03 23:55   ` Sam Vilain
2006-04-04  9:28     ` Andreas Ericsson
2006-04-04  9:51       ` Junio C Hamano
2006-04-04 10:44         ` Andreas Ericsson
2006-04-04 11:03       ` Jakub Narebski
2006-04-04 11:47         ` Andreas Ericsson
2006-04-20 18:08           ` Jon Loeliger
2006-04-20 18:55             ` Junio C Hamano
2006-04-21  8:50               ` Andreas Ericsson
2006-04-04 19:00     ` Junio C Hamano
2006-04-04 20:18       ` Jakub Narebski
2006-04-05  6:34       ` Sam Vilain
2006-04-05  7:11         ` Jakub Narebski
2006-04-05  7:31           ` Sam Vilain
2006-04-05  7:59             ` Jakub Narebski
2006-04-04  0:51 ` Jakub Narebski
2006-04-04 11:05 ` Catalin Marinas [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-04-03 22:13 linux

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: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=tnxzmj1ppm4.fsf@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sam@vilain.net \
    /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://80x24.org/mirrors/git.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).