All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Theodore Tso <tytso@mit.edu>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: I just pulled and built 'next'...
Date: Mon, 8 Jan 2007 22:21:24 -0500	[thread overview]
Message-ID: <20070109032124.GA1904@spearce.org> (raw)
In-Reply-To: <20070108210002.GA15121@thunk.org>

Theodore Tso <tytso@mit.edu> wrote:
> On Mon, Jan 08, 2007 at 12:11:35PM -0800, Junio C Hamano wrote:
> > One question is how you would sort the result.  If you sort them
> > by taggerdate, you would get v1.4.4.4 anyway ;-).
> 
> I was assuming either lexigraphically, or via some really complicated
> rpm/dpkg version number comparison scheme.  :-)
> 
> > If we go with topology, we do not necessarily have to find all
> > the tags.  When we hit a commit that is tagged, we can stop the
> > traversal (so after finding v1.5.0-rc0, we do not have to go
> > back along the 'master' lineage to find v1.4.4 tag).  Traversing
> > from the tip of 'master' (or 'next') this way we will notice
> > that v1.5.0-rc0 and v1.4.4.4 are the candidates without going
> > any further in the past.
> > 
> > But the question still remains which one between the two to
> > pick.
> 
> Yeah, that is the question.  If we're willing to look at the tag name,
> it's pretty clear that if both v1.5.0-rc0 and v1.4.4.4 is reachable
> from the head, it should be based on the "newer" version, i.e.,
> v1.5.0-rc0.  A human can figure this out easily, but algorithimically
> we end up having to use something like the rpm or dpkg version
> comparison algorithm, both of which are hueristics that will sometimes
> get thigns wrong.

  $ git rev-list v1.5.0-rc0..next | wc -l
  687
  $ git rev-list v1.4.4.4..next | wc -l
  1051

So what about doing Junio's suggestion of going by topology and
coming up with the possible set of tags (v1.5.0-rc0 and v1.4.4.4
right now), and if more than one is found compute the number of
commits between each tag and the requested revision, and take the
tag that has a smallest number of commits?

I think it would come up right more often than not and avoids
any sort of tag name parsing algorithm.  It is also somewhat
explainable to users as it does have some common sense: the tag
"nearest" to the requested revision is the one that has the most
number of commits in common with the requested revision.

-- 
Shawn.

  reply	other threads:[~2007-01-09  3:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08 13:32 I just pulled and built 'next' Theodore Ts'o
2007-01-08 20:11 ` Junio C Hamano
2007-01-08 21:00   ` Theodore Tso
2007-01-09  3:21     ` Shawn O. Pearce [this message]
2007-01-09  9:39       ` Andreas Ericsson
2007-01-09 13:54       ` Theodore Tso
2007-01-09 17:35       ` Uwe Kleine-König
2007-01-10  0:06         ` Shawn O. Pearce
2007-01-10 13:24           ` Uwe Kleine-Koenig

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=20070109032124.GA1904@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=tytso@mit.edu \
    /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.