From: David Kastrup <dak@gnu.org>
To: Andreas Krey <a.krey@gmx.de>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: Consistency question
Date: Wed, 15 Jan 2014 14:00:30 +0100 [thread overview]
Message-ID: <87ppnt7635.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <20140115124434.GA27030@inner.h.apk.li> (Andreas Krey's message of "Wed, 15 Jan 2014 13:44:34 +0100")
Andreas Krey <a.krey@gmx.de> writes:
> On Wed, 15 Jan 2014 12:40:29 +0000, David Kastrup wrote:
> ...
>> With a single root, "depth" helps a lot. When looking for a common
>> parent of a number of commits, you first shorten all ancestries to the
>> same size and then you can look for the point of convergence in
>> lockstep.
>
> Hmm, how about traversing from all the start commits downwards
> simultaneously, noting which start you say each commit from, and stopping
> when you have a commit carrying all start labels?
It means that when the start commits are at considerably different
depth, you'll traverse much more material than necessary.
Also you need labels.
> I don't quite see how the same size plus lockstep works out (but the
> 'same size' part is possibly the same as my 'concurrent traversal').
It just equalizes the depth before starting, so you don't need labels:
any common ancestor is reached at the same time by its descendants.
Of course, I conveniently forgot merge commits. This scheme works out
of the box only with single parenting. And it works fine without a
common ancestor, too: you just run into a NULL pointer at the same time
when there isn't one.
So, uh, this solution does not really seem to match the problem...
--
David Kastrup
next prev parent reply other threads:[~2014-01-15 13:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 10:37 Consistency question David Kastrup
2014-01-15 11:13 ` Jeff King
2014-01-15 11:40 ` David Kastrup
2014-01-15 12:44 ` Andreas Krey
2014-01-15 13:00 ` David Kastrup [this message]
2014-01-15 13:45 ` Andreas Krey
2014-01-15 11:55 ` David Kastrup
2014-01-18 1:22 ` Mike Hommey
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=87ppnt7635.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=a.krey@gmx.de \
--cc=git@vger.kernel.org \
--cc=peff@peff.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.