:So Git makes some projects jump down from {{ic|x.x.x.210}} to {{ic|x.x.x.50}}? Is that really intended behavior?

:So Git makes some projects jump down from {{ic|x.x.x.210}} to {{ic|x.x.x.50}}? Is that really intended behavior?

:--[[User:Det|Det]] ([[User talk:Det|talk]]) 22:48, 2 May 2013 (UTC)

:--[[User:Det|Det]] ([[User talk:Det|talk]]) 22:48, 2 May 2013 (UTC)

+

+

::Yes, that's intended behavior. That number is the number of commits since the last tag, so it will reset every time the author tags a new commit. [[User:Scimmia|Scimmia]] ([[User talk:Scimmia|talk]]) 08:02, 4 May 2013 (UTC)

checking out branches/tags needs clarification

The #fragment part of the VCS source URL has a different meaning for each type of VCS.
This can be confusing for people, especially when they are trying to checkout a specific branch or tag.
Examples would reduce the chance for confusion a lot.

fictional examples for git and svn (don't have experience with bzr or HG)

More on git pkgver()'s

so they are more friendly to vercmp.
Current behaviour using git-git as an example:

current ver: 1.8.2.210.g123abc-1
next ver: 1.8.2.1.50.g123abc-1

vercmp 1.8.2.210.g123abc 1.8.2.1.50.g123abc
1 # the first is greater than the second

Right now, the current version is actually greater than the new version, causing a downgrade. If r is appended to the patch level (the numbers just before the g<hex> bit), then vercmp would order the versions correctly.

current ver: 1.8.2.r210.g123abc-1
next ver: 1.8.2.1.r50.g123abc-1

vercmp 1.8.2.r210.g123abc 1.8.2.1.r50.g123abc
-1 # the first is less than the second

Yes, that's intended behavior. That number is the number of commits since the last tag, so it will reset every time the author tags a new commit. Scimmia (talk) 08:02, 4 May 2013 (UTC)

Clarifying the first Git function

Instead of just sed 's|-|.|g' it'd probably be better to give some example with cut (which you're probably gonna end up using anyway) and tr (which is simpler than sed). Then you could either explain it like this or just mention the man pages: "cut -d "-" -f2- cuts from the first hyphen (-) to the end, tr - . converts hyphens to dots (.) and tr -d - removes the hyphens".

Also the output should be something like 2.0.6.a17a017 to include the $(git rev-parse --short HEAD) part for clarification.