Re: Git describe question

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: Git describe question

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:56

Mark Burton [off-list ref] writes:
Having just pulled the latest updates, git describe says:

v1.5.6.3-315-g10ce020

Why does it think there are 315 commits on top of the v1.5.6.3 tag?
Short answer.  Because there are.  Count'em ;-)

	$ git rev-list v1.5.6.3..master | wc -l

A longer answer.  v1.5.6.X releases are from 'maint'.  The branch has
forked from the mainline loooong time ago (at v1.5.6, to be exact), and
has only fixes.  'master' is a separate branch for development that would
eventually lead to the next major release (planned to be v1.6.0).

Re: Git describe question

From: Mark Burton <hidden>
Date: 2016-06-15 22:44:56

Thanks for the speedy response.
A longer answer.  v1.5.6.X releases are from 'maint'.  The branch has
forked from the mainline loooong time ago (at v1.5.6, to be exact), and
has only fixes.  'master' is a separate branch for development that would
eventually lead to the next major release (planned to be v1.6.0).
Ok, I understand what it's doing now - but that makes me wonder if it
would be useful/possible to be able to specify that git describe only
considers the commits on top of the tag for the current (or some
specified branch). i.e. at the moment, gitk shows 8 commits on top of
v1.5.6.3 in the master branch.

As the master branch is the checked out branch and the v1.5.6.3 tag
tags a commit in that branch (via the merge) is it not possible to only
consider the commits between the tag and the HEAD on that branch?

Sorry, I don't understand the git internals (yet) so I don't know if
this is a stupid question and I am certainly not in a position to try
and implement it myself (yet).

Cheers,

Mark

Re: Git describe question

From: Jean-Luc Herren <hidden>
Date: 2016-06-15 22:44:56

Mark Burton wrote:
Ok, I understand what it's doing now - but that makes me wonder if it
would be useful/possible to be able to specify that git describe only
considers the commits on top of the tag for the current (or some
specified branch). i.e. at the moment, gitk shows 8 commits on top of
v1.5.6.3 in the master branch.
Are you saying "git describe" should output v1.5.6.3-8-g10ce020?
That would be misleading and even wrong.  This would be like
saying that there are only 8 commits of difference between
v1.5.6.3 and 10ce20, which is not true.  The differences between
those two commits are over 300 single commits and that's also what
"git (log|diff) v1.5.6.3..10ce20" will tell you.  All 300+ commits
that have been made to the branch master since the branch maint
forked off are part of 10ce20, but not part of v1.5.6.3.  It seems
fine to me that "git describe" reflects this difference.
As the master branch is the checked out branch and the v1.5.6.3 tag
tags a commit in that branch (via the merge) [...]
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.

jlh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help