Version height calculated differently in 3.4 with new git backend (original) (raw)

It seems git version height still yields different results with the new git backend in some cases. This tripped us up because it meant old packages were being overwritten with new ones, causing chaos in our dependency graph.

Seems to be different from #587 since we get a non-zero version and it still happens in 3.4.231?

$ dotnet tool install --global nbgv
You can invoke the tool using the following command: nbgv
Tool 'nbgv' (version '3.4.231') was successfully installed.
$ nbgv.exe get-version
Version:                      1.0.28.5486
AssemblyVersion:              1.0.0.0
AssemblyInformationalVersion: 1.0.28+6e152011
NuGetPackageVersion:          1.0.28
NpmPackageVersion:            1.0.28

and with the old git backend:

$ NBGV_GitEngine=LibGit2 nbgv.exe get-version
Version:                      1.0.49.5486
AssemblyVersion:              1.0.0.0
AssemblyInformationalVersion: 1.0.49+6e152011
NuGetPackageVersion:          1.0.49
NpmPackageVersion:            1.0.49

Nbgv version 3.3.37 yields 1.0.49 also.

The version.json file is:

{
  "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
  "version": "1.0",
  "pathFilters": ["."],
  "gitCommitIdShortFixedLength": 8,
  "publicReleaseRefSpec": [
    "^refs/heads/develop$"
  ]
}