git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: A Large Angry SCM <gitzilla@gmail.com>
To: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Additional merge-base tests
Date: Tue, 04 Jul 2006 13:08:10 -0700	[thread overview]
Message-ID: <44AACAAA.1030708@gmail.com> (raw)
In-Reply-To: <7vpsgllsnp.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> A Large Angry SCM <gitzilla@gmail.com> writes:
> 
>>> This is a good demonstration that merge-base may not give you
>>> minimal set for pathological cases.  If you want to be through
>>> you could traverse everything to make sure we do not say 'S' is
>>> relevant, but that is quite expensive, so I think there will
>>> always be artifacts of horizon effect like this no matter how
>>> you try to catch it (didn't I keep saying that already?).
>> The problem is in mark_reachable_commits(); it is either superfluous
>> or it needs to parse_commit() those commits that haven't been parsed
>> yet that it needs to traverse.
> 
> Yes, you could traverse everything.  But that is not practical.
> We have known that the clean-up pass has this horizon effect,
> and it is a compromise.

The clean-up pass was devised to eliminate bases that are reachable from 
other bases. It just doesn't look hard enough.

> If you apply this testing patch on top of yours, you will see
> that parsing more commits at that point makes the clean-up
> pass go all the way down to the root commit.

Yes, I was aware of graphs that would have that behavior.

The root of the problem is that the heuristic, that attempts to use 
timestamps to detect that a commit is _not_ reachable from a given 
commit, relies on the timestamps of commits with a reachability 
relationship to have a relationship that matches the graph.

> We may alternatively not use the clean-up pass at all, but I
> suspect that might give us many false positives.  I don't
> remember the details but I think we added it while fixing
> merge-base in the real life situation.

The history of the clean-up pass is that before it was added, 
git-merge-base was returning a base reachable from another base, and the 
base returned was, in some significant way, worse for merging. My 
construct demonstrates that the clean-up pass only deals with special case.

> It may be interesting to run tests on real merges (I believe the
> kernel repository has a handful merges that have more than one
> merge bases) to see how effective the current clean-up pass is.
> It may turn out to be ineffective in practice, in which case we
> could kill it off.

Although a very important set of repositories to Git, the linux kernel 
repositories may no longer be representative of the diversity of Git 
use. Still, it would be interesting to know the outcome.

  parent reply	other threads:[~2006-07-04 20:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04  3:55 [PATCH] Additional merge-base tests A Large Angry SCM
2006-07-04  5:47 ` Junio C Hamano
2006-07-04  6:41   ` A Large Angry SCM
2006-07-04  7:17     ` Junio C Hamano
2006-07-04  7:45     ` Junio C Hamano
2006-07-04  8:23       ` Johannes Schindelin
2006-07-04 10:38         ` Junio C Hamano
2006-07-04 11:16           ` Jakub Narebski
2006-07-04 11:35             ` Johannes Schindelin
2006-07-04 11:40           ` Johannes Schindelin
2006-07-04 20:18         ` A Large Angry SCM
2006-07-04 21:15         ` Junio C Hamano
2006-07-04 22:25           ` Johannes Schindelin
2006-07-04 22:42             ` Junio C Hamano
2006-07-04 23:07             ` A Large Angry SCM
2006-07-04 23:14               ` Jakub Narebski
2006-07-04 23:39                 ` Junio C Hamano
2006-07-05  0:26                 ` A Large Angry SCM
2006-07-05  0:24               ` Junio C Hamano
2006-07-05  7:56               ` Johannes Schindelin
2006-07-05 16:15                 ` A Large Angry SCM
2006-07-05 17:04                   ` Johannes Schindelin
2006-07-05  8:39           ` Josef Weidendorfer
2006-07-05 14:28             ` A Large Angry SCM
2006-07-04 20:08       ` A Large Angry SCM [this message]
2006-07-05  0:59       ` Junio C Hamano

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=44AACAAA.1030708@gmail.com \
    --to=gitzilla@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.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 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 NNTP newsgroup(s).