git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 3/3] name-rev: --weight option (WIP)
Date: Wed, 29 Aug 2012 23:55:52 -0400	[thread overview]
Message-ID: <20120830035552.GC32268@sigill.intra.peff.net> (raw)
In-Reply-To: <7vharlujaq.fsf@alter.siamese.dyndns.org>

On Wed, Aug 29, 2012 at 08:53:49PM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > I wonder if you can
> > define the weight as a recursive function of the parents.
> 
> I do not think we can.  A merge Z between X (that has N commits
> behind it) and Y (that has M commits behind it) has at most N+M+1
> commits behind it (counting itself), but we cannot tell how many
> among these N and M are shared.
> 
> > That would double-count "A" and "B" in this example. But maybe there is
> > a clever way to define it that avoids that.
> 
> We've dealt with this issue long time ago when we optimized the
> bisection count, which involves exactly the same issue.

OK. I didn't think too hard about it, so I'll trust you that it is not
easy. I wonder if using the generation number would be another way of
defining "oldest" that would be easier to calculate.

-Peff

  reply	other threads:[~2012-08-30  3:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-29  4:48 Funny 'git describe --contains' output Greg KH
2012-08-29  5:57 ` Junio C Hamano
2012-08-29  6:36   ` Junio C Hamano
2012-08-29 18:17     ` Greg KH
2012-08-29 21:17     ` [PATCH 0/3] "git name-rev --weight" Junio C Hamano
2012-08-29 21:17       ` [PATCH 1/3] name-rev: lose unnecessary typedef Junio C Hamano
2012-08-29 21:17       ` [PATCH 2/3] name_rev: clarify when a new tip-name is assigned to a commit Junio C Hamano
2012-08-29 21:17       ` [PATCH 3/3] name-rev: --weight option (WIP) Junio C Hamano
2012-08-29 23:37         ` Junio C Hamano
2012-08-30  3:36           ` Jeff King
2012-08-30  3:53             ` Junio C Hamano
2012-08-30  3:55               ` Jeff King [this message]
2012-08-30  4:10                 ` Junio C Hamano
2012-08-30  4:15                   ` Junio C Hamano
2012-08-30 15:59               ` Junio C Hamano
2012-08-30  3:51         ` Jeff King
2012-08-30  4:09           ` Junio C Hamano
2012-08-30  7:06       ` [PATCH 0/3] "git name-rev --weight" Philip Oakley
2012-08-30 15:54         ` 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=20120830035552.GC32268@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=gregkh@linuxfoundation.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.
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).