Skip to content

StackOverflow exception while using increment: Inherit config, and branches merging #2034

Closed
@dzenchar

Description

@dzenchar

Hello,

I encountered an issue while using the latest beta version GitVersion v5.1.4-beta1.48.
The problem is that, the GitVersion task falls into stack overflow after the following scenario:

  1. There are two branches master and dev (master is the source branch for dev)
  2. Push some change-set into the master branch. master increments version patch number
  3. Merge changes from master into dev
  4. Run GitVersion.exe onto dev branch -> stack overflow exception

My GitVersion.yml:

assembly-versioning-scheme: MajorMinorPatch
mode: Mainline
tag-prefix: '[vV]'
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
commit-message-incrementing: Enabled
branches:
  hotfix:
    regex: hotfix?[/-]
    tag: useBranchName
  feature:
    regex: feature?[/-]
  develop:
    regex: ^dev(elop)?(ment)?$
    tag: alpha
    increment: Inherit
    prevent-increment-of-merged-branch-version: false
    track-merge-target: true
  master:
    increment: Patch
    prevent-increment-of-merged-branch-version: true
    track-merge-target: false
ignore:
  sha: []
merge-message-formats: {}

I've tried both GitVersion.exe as well as GitVersion MSBuild task.
Log:

GitVersionTask.targets(10,9): warning : 2020-01-13 15:51:53		    WARN [01/13/20 15:51:53:30] Failed to inherit Increment branch configuration, no branches found.
GitVersionTask.targets(10,9): warning : 
GitVersionTask.targets(10,9): warning : Falling back to dev branch config
GitVersionTask.targets(10,9): warning :
GitVersionTask.targets(10,9): warning : 2020-01-13 15:51:53		      WARN [01/13/20 15:51:53:31] Failed to inherit Increment branch configuration, no branches found.
GitVersionTask.targets(10,9): warning : 
GitVersionTask.targets(10,9): warning : Falling back to dev branch config
GitVersionTask.targets(10,9): warning :
GitVersionTask.targets(10,9): warning : 2020-01-13 15:51:53		        WARN [01/13/20 15:51:53:32] Failed to inherit Increment branch configuration, no branches found.
GitVersionTask.targets(10,9): warning : 
GitVersionTask.targets(10,9): warning : Falling back to dev branch config
GitVersionTask.targets(10,9): warning :
GitVersionTask.targets(10,9): warning : 2020-01-13 15:51:53		          WARN [01/13/20 15:51:53:32] Failed to inherit Increment branch configuration, no branches found.
GitVersionTask.targets(10,9): warning : 
GitVersionTask.targets(10,9): warning : Falling back to dev branch config
GitVersionTask.targets(10,9): warning :
GitVersionTask.targets(10,9): warning : 2020-01-13 15:51:53		            WARN [01/13/20 15:51:53:33] Failed to inherit Increment branch configuration, no branches found.
...

An image of my Git graph:
git-history

P.S. There is a workaround, if I disable inheritance on develop branch:

develop:
    increment: **None**

But this case the develop branch don't use a version number from master.

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