From my "main" build:
Lazarus 2.3.0 rmain-2_3-306-gbbe0b81f62 FPC 3.2.0 x86_64-win64-win32/win64
That is "git desclibe"
306 commits since the tag main-2_3 on commit bbe0b81f62
The 306 is not always "exact". In case of branches (within main) it could be on either side. After a merge it counts both sides.
If git describe is called with then it will not search along merge branches.
Yes, but the "306" is still not "exact" => as in: you can recompute the commit from the 306.
The 306 is in both cases "exact" as in reproducible.
If I have commits on main as follows:
main-2_3 => C1 => C2 => C3 => C4=> M => C5
\> M1 => M2 =^
Then with or without first-parent:
- if I am on C2 I get: main-2_3- 2 -gC2
- if I am on M2 I get: main-2_3- 2 -gM2
In both cases, I am 2 commits after the tag.
However if I am on C5 then first-parent makes a diff
- with first-parent: main-2_3- 6 -gC5
- without first-parent: main-2_3- 8 -gC5
Both is correct, as long as you know which setting was used.
Neither contains any info if a reference to
main-2_3-123-gxxxxx
is on the official repo,
or an un-merged branch on a fork.