Skip to content

Commit 5c419d7

Browse files
committed
Update README to better describe git height calculation
1 parent 7452e9f commit 5c419d7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

readme.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,14 @@ When built as a public release, the git commit ID is dropped:
7070

7171
### What is 'git height'?
7272

73-
Git 'height' is the count of commits in the longest path between HEAD (the code you're building)
74-
and some origin point. In this case the origin is the commit that set the major.minor version number
75-
to the values found in HEAD.
73+
Git 'height' is the number of commits in the longest path from HEAD (the code you're building)
74+
to some origin point, inclusive. In this case the origin is the commit that set the major.minor
75+
version number to the values found in HEAD.
7676

7777
For example, if the version specified at HEAD is 3.4 and the longest path in git history from HEAD
78-
to where the version file was changed to 3.4 is 15 steps, then the git height is "15".
78+
to where the version file was changed to 3.4 includes 15 commits, then the git height is "15".
79+
Another example is when HEAD points directly at the commit that changed the major.minor version,
80+
which has a git height of 1. [Learn more about 1 being the minimum revision number][GitHeightMinimum].
7981

8082
### Why is the git height used for the PATCH version component for public releases?
8183

@@ -116,3 +118,4 @@ Prerequisites and build instructions are found in our
116118
[contributing guidelines](CONTRIBUTING.md).
117119

118120
[semver]: http://semver.org
121+
[GitHeightMinimum]: https://github.com/AArnott/Nerdbank.GitVersioning/issues/102#issuecomment-269591960

0 commit comments

Comments
 (0)