git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Kevin Bracey <kevin@bracey.fi>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC/PATCH 1/3] revision.c: tighten up TREESAME handling of merges
Date: Mon, 29 Apr 2013 11:11:32 -0700	[thread overview]
Message-ID: <7v1u9tjjfv.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <517EB205.6090804@bracey.fi> (Kevin Bracey's message of "Mon, 29 Apr 2013 20:46:45 +0300")

Kevin Bracey <kevin@bracey.fi> writes:

> At present, either query will show lots of really boring merge commits
> of topic branches at the boundary, with 1 INTERESTING parent that
> they're TREESAME too, and 1 UNINTERESTING parent that they may or may
> not be TREESAME to, depending on how old the base of that topic branch
> was. Most such commits are of no relevance to our history
> whatsoever. In the case of "--simplify-merges", the fact that they're
> UNINTERESTING actually _prevented_ their simplification - if it had
> been allowed to follow the UNINTERESTING path back further, it would
> have reached an ancestor, and been found redundant. So limiting the
> rev-list actually increases the number of merges shown.
>
> We can lose all those boring commits with these two changes:
>
> 1) Previously TREESAME was defined as "this commit matches at least 1
> parent". My first patch changes it to "this commit matches all
> parents". It should be refined further to "this commit matches all
> INTERESTING parents, if it has any, else all (UNINTERESTING)
> parents". (Can we word that better?) Note that this fancy rule
> collapses to the same straightforward TREESAME check as ever for 0- or
> 1-parent commits.
>
> 2) simplify_merges currently will not simplify commits unless they
> have exactly 1 parent. That's not what we want. We only need to
> preserve commits that don't have exactly 1 INTERESTING parent.
>
> Those 2 rules produce the desirable result: if we have a merge commit
> with exactly 1 INTERESTING parent it is TREESAME to, it is always
> simplified away - any other UNINTERESTING parents it may have did not
> affect our code, so we don't care about whether we were TREESAME to
> them or not, and as we don't want to see any of the UNINTERESTING
> parents themselves, the merge is not worth showing.
>
> This makes a massive difference on some of my searches, reducing the
> total commits shown by a factor of 5 to 10, greatly improving the
> signal-to-noise ratio.
>
> I'll put together a trial patch at the end of the next iteration of
> the series that implements this logic. I need to think a bit more - I
> think "get_commit_action" needs a similar INTERESTING check for merges
> too, to get the same sort of effect without relying on
> simplify_merges. Parent rewriting shouldn't necessitate keeping all
> merges - only merges with 2+ INTERESTING parents.

Everything you wrote above makes tons of sense.

One small worry is how this new simplification interacts with the
first parent mode. For the purpose of showing the merge commit
itself, the second and subsequent parents are treated as "not
INTERESTING" in the above discussion, but that should not propagate
back to their parents like the normal UNINTERESTING-ness does.

      reply	other threads:[~2013-04-29 18:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09 18:00 Locating merge that dropped a change Kevin Bracey
2013-04-11 17:28 ` Kevin Bracey
2013-04-11 19:21   ` Junio C Hamano
2013-04-22 19:23     ` [RFC/PATCH] Make --full-history consider more merges Kevin Bracey
2013-04-22 19:49       ` Junio C Hamano
2013-04-23 16:35         ` Kevin Bracey
2013-04-24 22:34           ` Junio C Hamano
2013-04-25  1:59             ` Junio C Hamano
2013-04-25 15:48               ` Kevin Bracey
2013-04-25 16:51                 ` Junio C Hamano
2013-04-25 17:11                   ` Kevin Bracey
2013-04-25 18:19                     ` Junio C Hamano
2013-04-26 19:18                       ` Kevin Bracey
2013-04-26 19:31                         ` [RFC/PATCH 1/3] revision.c: tighten up TREESAME handling of merges Kevin Bracey
2013-04-26 19:31                           ` [RFC/PATCH 2/3] simplify-merges: never remove all TREESAME parents Kevin Bracey
2013-04-27 23:02                             ` Junio C Hamano
2013-04-28  7:10                               ` Kevin Bracey
2013-04-28 18:09                                 ` Junio C Hamano
2013-04-26 19:31                           ` [RFC/PATCH 3/3] simplify-merges: drop merge from irrelevant side branch Kevin Bracey
2013-04-27 22:36                           ` [RFC/PATCH 1/3] revision.c: tighten up TREESAME handling of merges Junio C Hamano
2013-04-27 22:57                             ` David Aguilar
2013-04-28  7:03                             ` Kevin Bracey
2013-04-28 18:38                               ` Junio C Hamano
2013-04-29 17:46                                 ` Kevin Bracey
2013-04-29 18:11                                   ` Junio C Hamano [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: 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=7v1u9tjjfv.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kevin@bracey.fi \
    --cc=torvalds@linux-foundation.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://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).