git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marco Costalba" <mcostalba@gmail.com>
To: "Junio C Hamano" <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: Gitk feature - show nearby tags
Date: Sun, 4 Jun 2006 12:42:16 +0200	[thread overview]
Message-ID: <e5bfff550606040342q5e485ae2lcc00e36ed405be8c@mail.gmail.com> (raw)
In-Reply-To: <e5bfff550606040333h1180bbep88fa90ea9928d062@mail.gmail.com>

On 6/4/06, Marco Costalba <mcostalba@gmail.com> wrote:
> On 6/4/06, Junio C Hamano <junkio@cox.net> wrote:
> > "Marco Costalba" <mcostalba@gmail.com> writes:
> >
> > > In a less corner case, just to better explaing my idea, consider this:
> > >
> > >          a---b---d---e---f---g---h
> > >          t1   \ /              t3
> > >             ---c
> > >                t2
> > >
> > > Where our sha1 is still "e", in this case
> > >
> > > git-rev-list  --topo-order <e>  ^a  ^c   ^g
> > >
> > > gives, as last revision in output list, "f"
> > > Then parentOf(<f>) is <g> and our looked for tag is t3
> >
> > Sorry, in the example time flows from left to right.  If you
> > exclude g then you are excluding everything that is reachable
> > from g so you would not see "f".

To better explain what I mean, that's the algorithm :

cmd = "git-rev-list --topo-order --parents " + sha;
for (uint i = 0; i < tagList.count(); i++)
	cmd.append(" ^" + tagList[i]);

output = run(cmd);

if (output.isEmpty()) {
	parent = parentOf(sha);
	return (parent && parent->isTag()) ? parent->tag() : NO_TAG;
}

lastSha = getLastLine(output);
parent = parentOf(lastSha);
return (parent && parent->isTag()) ? parent->tag() : NO_TAG;

  reply	other threads:[~2006-06-04 10:42 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-03  9:38 Gitk feature - show nearby tags Paul Mackerras
2006-06-03 10:29 ` Junio C Hamano
2006-06-03 11:16   ` Marco Costalba
2006-06-04  1:59     ` Paul Mackerras
2006-06-04  7:08       ` Marco Costalba
2006-06-04  9:25         ` Junio C Hamano
2006-06-04  9:40           ` Marco Costalba
2006-06-04  9:21     ` Junio C Hamano
2006-06-04  9:54       ` Marco Costalba
2006-06-04 10:06         ` Junio C Hamano
2006-06-04 10:10           ` Junio C Hamano
2006-06-04 10:33           ` Marco Costalba
2006-06-04 10:42             ` Marco Costalba [this message]
2006-06-04 10:42             ` Junio C Hamano
2006-06-04 13:57               ` Marco Costalba
2006-06-05  6:20                 ` Junio C Hamano
2006-06-05 11:54                   ` Marco Costalba
2006-06-03 12:23   ` Paul Mackerras
2006-06-03 16:50     ` Junio C Hamano
2006-06-04  1:51       ` Paul Mackerras
2006-06-03 15:12   ` Jonas Fonseca
2006-06-03 15:33     ` Jakub Narebski
2006-06-03 16:19       ` Jonas Fonseca
2006-06-04 20:58     ` Junio C Hamano
2006-06-05  0:04       ` Jonas Fonseca
2006-06-05  1:37         ` Junio C Hamano
2006-06-05 20:08           ` Junio C Hamano
2006-06-05 20:19           ` Jonas Fonseca
2006-06-05 21:11       ` Jonas Fonseca

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=e5bfff550606040342q5e485ae2lcc00e36ed405be8c@mail.gmail.com \
    --to=mcostalba@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).