Skip to content

Wrong commit count when release branch is deleted #1678

@LordMike

Description

@LordMike

Hi,

I thought #1635 would have fixed this, but it doesn't seem like it in dotnet-gitversion version 5.0.0-beta.2+95.Branch.master.Sha.080d4598865e8e0c5dbdb017cacf4171cd37eb69.

We've observed that we get different outputs from GitVersion, depending on the presence of a release/x.y.z branch or not - even when that release branch has been merged into the local branch.

  • With the release branch present (it sits on a commit just before being merged in both develop and master), we have 183 commits
  • With no release branch (but still have tags, merges etc..), we get 172 commits.

What I'm really wondering about, is how the presence of a branch in a line of commits that already should be accounted for in the counting logic ... changes the source commit id.

The logs below are outputs from dotnet-gitversion /diag, on develop with no remotes (deleted to reduce errors), with and without a release branch:

  • w/ Release branch, develop produces 183 commits -- log: gives-183.txt
  • wo/ Release branch, develop produces 172 commits -- log: gives-172.txt

Note: We use 4 components in our versioning, as we control the first three for human purposes, and then let GitVersion control the last component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions