Re: Git describe question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 14 Jul 2008 16:17:52 -0700
Junio C Hamano <gitster@xxxxxxxxx> wrote:

> Jean-Luc Herren <jlh@xxxxxx> writes:
> 
> > Mark Burton wrote:
> > ...
> > I don't think people usually say "tag X is on branch Y", excepted
> > maybe if Y has never been merged anywhere.  Specifically, nobody
> > would say v1.5.6.3 is *on* branch master.  But it's part of its
> > history.  v1.5.6.3 is *on* maint, at best.
> 
> Actually I am somewhat sympathetic to Mark here.  Probably what he wants
> is to describe 10ce020 as v1.5.6-390-10ce020.
> 
> While that probably is doable by using the first-parent-only traversal, I
> do not think it is such a good idea.  It is not how branches in git are
> designed to work.  As Merlyn always says in #git at freenode, a branch is
> an illusion, and it is especially true in the presense of fast-forward
> merge (aka the upstream maintainer asking a subsystem lieutenant to do a
> merge for him).

Hi Guys,

Many thanks for the replies which make sense.

I guess the thing that prompted my original email was the fact that
when you look at output from gitk, the "distance" between 1.5.6.3 and
HEAD is only a few commits and that led me to expect that the output of
describe would show a smaller number than it does. I now understand why
it is how it is.

However, the git describe manual page does mention branches:

>With something like git.git current tree, I get:
>
>           [torvalds@g5 git]$ git-describe parent
>           v1.0.4-14-g2414721
>i.e. the current head of my "parent" branch is based on v1.0.4,
>but since it has a handful commits on top of that, describe has added
>the number of additional commits ("14") and an abbreviated object name
>for the commit itself ("2414721") at the end.

If you're a git newbie (like me) those words suggest that the commits
are "on" branch parent and you could measure the direct distance
between them by following the branch. Perhaps, the manual page should
contain a sentence similar to this:

Branches have no influence on the git describe long format output 
which is derived only from the number of commits in the chain from the
described tag to the committish.

Cheers,

Mark
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux