git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: finding earliest tags descended from a given commit
Date: Fri, 26 Jan 2007 23:55:52 -0500	[thread overview]
Message-ID: <20070127045552.GB9966@spearce.org> (raw)
In-Reply-To: <20070127044246.GC14205@fieldses.org>

"J. Bruce Fields" <bfields@fieldses.org> wrote:
> That's interesting, I hadn't noticed name-rev before you and Shawn
> mentioned it.
> 
> It only finds one name, though. When I tried it just now on my
> repository what it found was a tag I'd created for an experimental
> version, which probably wouldn't be what I wanted.  (Though it might be,
> in some situations.)

Yea. Hmm.  Maybe name-rev needs to learn a few more tricks, like
favoring annotated tags over non-annotated ones/heads, and being
able to print the top n nearest matches (e.g. 10), by displaying
only one line of output per tag (or ref).

Right now I'm trying to educate describe some more.  Although
similar, describe has a much easier job as its very easy for it to
say "that's the best name we have for the input".  Part of that is
because it is favoring annotated tags all of the time, and part of
that is because it does this distance computation thing now and
always favors the tag with the shortest distance between the tag
and the input.

In the case of name-rev I'm thinking maybe its actually the longest
distance annotated tag that makes sense.  That is, prefer to name
the input using the annotated tag which has the shortest distance
between the tag and the input, but where the tag is the farthest
back in history you can go when compared to any other possible tag,
and yet stills contains the input in its ancestry.

-- 
Shawn.

  reply	other threads:[~2007-01-27  4:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-27  4:06 finding earliest tags descended from a given commit J. Bruce Fields
2007-01-27  4:22 ` Shawn O. Pearce
2007-01-27  4:34 ` Linus Torvalds
2007-01-27  4:42   ` J. Bruce Fields
2007-01-27  4:55     ` Shawn O. Pearce [this message]
2007-01-27  5:23       ` Junio C Hamano
2007-01-27 12:39         ` [PATCH] name-rev: introduce the --ref-filter=<regex> option Johannes Schindelin
2007-02-17 14:02           ` Johannes Schindelin
2007-02-17 14:59             ` Jeff King
2007-02-17 17:50               ` Johannes Schindelin
2007-02-17 18:25               ` Junio C Hamano
2007-02-17 23:13                 ` [PATCH] git-name-rev: accept list of refs from user Jeff King
2007-02-17 23:19                   ` Jeff King
2007-02-17 23:30                     ` Junio C Hamano
2007-02-17 23:40                       ` Jeff King
2007-02-18  0:02                         ` Johannes Schindelin
2007-02-17 17:42             ` [PATCH] name-rev: introduce the --ref-filter=<regex> option Junio C Hamano
2007-02-17 18:01               ` Johannes Schindelin
2007-02-17 18:22               ` [PATCH] name-rev: introduce the --ref-filter=<pattern> option Johannes Schindelin
2007-02-17 18:47                 ` Junio C Hamano
2007-02-17 23:55                   ` Johannes Schindelin
2007-02-17 19:00                 ` 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=20070127045552.GB9966@spearce.org \
    --to=spearce@spearce.org \
    --cc=bfields@fieldses.org \
    --cc=git@vger.kernel.org \
    --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.
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).