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 15:57:25 +0200	[thread overview]
Message-ID: <e5bfff550606040657p5c1a3dceq3eef254ab64f0e3a@mail.gmail.com> (raw)
In-Reply-To: <7v3belcicq.fsf@assigned-by-dhcp.cox.net>

On 6/4/06, Junio C Hamano <junkio@cox.net> wrote:
> "Marco Costalba" <mcostalba@gmail.com> writes:
>
> >> 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".
> >>
> > From today git:
> >
> > tag list is:
> >
> > v1.3.3 1b9bc5a7b7434d771726011613a00cb202bd9f44
> > v1.3.2 7abd7117ec57b8c3c2a469db62c7811fdac5c655
> > v1.3.1 7d09fbe4ab7f080a8f8f5dcef7e0f3edf5e26019
> > v1.3.0 4baff50551545e2b6825973ec37bcaf03edb95fe
> >
> > selected sha is ccb365047a1081455b767867f0887e7b4334f9d8
> > (Allow "git repack" users to specify repacking window/depth)
> >
> > $ git-rev-list --topo-order ccb365047a1081455b767867f0887e7b4334f9d8
> > ^1b9bc5a7b7434d771726011613a00cb202bd9f44
> > ^7abd7117ec57b8c3c2a469db62c7811fdac5c655
> > ^7d09fbe4ab7f080a8f8f5dcef7e0f3edf5e26019
> > ^4baff50551545e2b6825973ec37bcaf03edb95fe
> >
> > ccb365047a1081455b767867f0887e7b4334f9d8
> > ...
> > cd2bdc5309461034e5cc58e1d3e87535ed9e093b
> >
> > Parent of cd2bdc5309461034e5cc58e1d3e87535ed9e093b is
> >
> > 4baff50551545e2b6825973ec37bcaf03edb95fe
> >
> > aka tag v1.3.0
> >
> > Am I missing something?
>
> No, just that I am not getting what you are trying to prove
> here.  The tags are all older than your chosen commit.
>
> $ git-rev-list --topo-order ^v1.3.0 ^v1.3.1 ^v1.3.2 ^v1.3.3 e923eff
>
> would show nothing -- and you propose to find out that commit is
> between v1.3.1 and v1.3.2 by using the information that the
> command gives an empty result but I do not know how?
>

OK. Now I understand.

I was erroneously thinking that in

$ git-rev-list --topo-order e923eff ^v1.3.0 ^v1.3.1 ^v1.3.2 ^v1.3.3

the listing (and searching) was _starting_ from e923eff, i.e. all the
previous stuff, in our case v1.3.2 and v1.3.3 was never seen neither
filtered out.

Following an extract from git-rev-list documentation.

DESCRIPTION
-----------
Lists commit objects in reverse chronological order *starting at the
given commit(s)*, taking ancestry relationship into account.  This is
useful to produce human-readable log output.

Commits which are stated with a preceding '{caret}' *cause listing to stop at
that point*. Their parents are implied. "git-rev-list foo bar {caret}baz" thus
means "list all the commits which are included in 'foo' and 'bar', but
not in 'baz'".



Perhaps it's me, but I really don't found clear from documentation
that git-rev-list anySha ^HEAD gives _always_ an empty result.

What I understand is that git-rev-list lists _first_ the given commit,
then his parents, then his grandparents and so on _until_ a commit
which is stated with a preceding '{caret}'  is found.
So everything that is between the given commit and HEAD is never found
and ignored.

Is it a problem to change the git-rev-list behaviour to reflect (my
understanding of) documentation or it breaks something?

If I have understood correctly with this change the above proposed
algorithm should work.

    Marco

  reply	other threads:[~2006-06-04 13:57 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
2006-06-04 10:42             ` Junio C Hamano
2006-06-04 13:57               ` Marco Costalba [this message]
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=e5bfff550606040657p5c1a3dceq3eef254ab64f0e3a@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).