Skip to content

GitVersion.Portable crashes on branch "development" GitVersion.yml has config for a branch named "development". #868

@ehvattum

Description

@ehvattum

Given a repository with a branch called development, and this branch is checked out, and in the working directory, there is a valid GitVersion.yml file, that have explicit branch configuration for the branch development.

It seems like the "development" branch is found twice.(The regex is added the "search collection" that have the development branch explicitly added from config?)
The problem does not persist on other branch names.
The problem does persist even if we use the obsolete GitVersionConfig.yaml.

The GitVersion.yml in question:

assembly-informational-format: '{NugetVersion}'
branches:
  master:
    mode: ContinuousDelivery
    prevent-increment-of-merged-branch-version: true
    increment: Patch
  feature[/-]:
    mode: ContinuousDeployment
    increment: Patch
    track-merge-target: true
  development:
    mode: ContinuousDeployment
    tag: yolo
    increment: Patch
    track-merge-target: true
INFO [05/19/16 12:50:56:16] End: Loading version variables from disk cache (Took: 15.01ms)
INFO [05/19/16 12:50:56:25] Using latest commit on specified branch
ERROR [05/19/16 12:50:56:26] An unexpected error occurred:
System.Exception: Multiple branch configurations match the current branch branchName of 'development'. Matching configurations: 'development, dev(elop)?(ment)?$'
   at GitVersion.BranchConfigurationCalculator.GetBranchConfiguration(Commit currentCommit, IRepository repository, Boolean onlyEvaluateTrackedBranches, Config config, Branch currentBranch, IList`1 excludedIn
heritBranches)
   at GitVersion.GitVersionContext.CalculateEffectiveConfiguration()
   at GitVersion.GitVersionContext..ctor(IRepository repository, Branch currentBranch, Config configuration, Boolean onlyEvaluateTrackedBranches, String commitId)
   at GitVersion.GitVersionContext..ctor(IRepository repository, Config configuration, Boolean isForTrackingBranchOnly, String commitId)
   at GitVersion.ExecuteCore.ExecuteInternal(String targetBranch, String commitId, IRepository repo, GitPreparer gitPreparer, String projectRoot, IBuildServer buildServer, Config overrideConfig)
   at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId
, Config overrideConfig)
   at GitVersion.SpecifiedArgumentRunner.Run(Arguments arguments, IFileSystem fileSystem)
   at GitVersion.Program.VerifyArgumentsAndRun()
INFO [05/19/16 12:50:56:26]
INFO [05/19/16 12:50:56:26] Here is the current git graph (please include in issue):
INFO [05/19/16 12:50:56:26] Showing max of 100 commits
INFO [05/19/16 12:50:56:35] * ce7d053 1 second ago  (HEAD -> development)
* 8e3aa43 2 minutes ago
*   87a2d31 69 minutes ago  (origin/development, origin/HEAD)
|\
| * 24259a3 24 hours ago  (origin/feature/fase3)
| * 5daf2c6 6 days ago
| * 2723ac3 9 days ago
| * c3fdc6a 9 days ago
| * e9f5906 9 days ago
| * d4ccb1b 2 weeks ago
| * e7cb2c5 2 weeks ago  (tag: 2.2.3)
| * d9b8e2f 2 weeks ago
| *   270cce1 2 weeks ago  (tag: 2.2.2-fase3, tag: 2.2.1-fase3)
| |\
| | * f48b373 2 weeks ago
| * | a344e4e 2 weeks ago
| |/
| * f029526 2 weeks ago
| * 4e6b4ba 3 weeks ago
| * d0b461f 3 weeks ago
| *   014fb6c 3 weeks ago  (feature/fase3)
| |\
| * \   c1f5403 3 weeks ago
| |\ \
| * | | 6a156c1 3 weeks ago  (origin/fase3)
* | | | a7763bd 6 days ago
| |_|/
|/| |
* | | 4c77a09 3 weeks ago
| |/
|/|
* | d3d0b66 3 weeks ago
* |   82e83d6 3 weeks ago
|\ \
| |/
| *   3276a7a 3 weeks ago
| |\
| | * 86138a3 3 weeks ago
| | * 143c93e 3 weeks ago
| * | 7834b92 3 weeks ago
| * | f19dfad 3 weeks ago
| * | 813f41c 3 weeks ago
| |/
* |   8c23d64 3 weeks ago
|\ \
| |/
| * 1403faf 3 weeks ago
| * 373c1c2 3 weeks ago
| * 1069804 3 weeks ago
| * 5b7d3e9 3 weeks ago
* | 033ebc4 3 weeks ago
* | 6097102 3 weeks ago
* |   a276141 3 weeks ago
|\ \
| |/
| * de575bd 3 weeks ago
| * 444dd31 3 weeks ago
* | 3c4ca3f 3 weeks ago
* | 14a6e57 3 weeks ago
* |   364635f 3 weeks ago
|\ \
| |/
| * 964ce82 3 weeks ago
| * 2f16ea3 3 weeks ago
| * ad0dceb 3 weeks ago
| * fbc7c79 3 weeks ago
| * e1baa27 4 weeks ago
| * 9a42c9a 4 weeks ago
| * b7a4fa6 4 weeks ago
| * b7a46d3 4 weeks ago
| * 301b9df 4 weeks ago
| * 6035299 4 weeks ago
| * af2fc60 4 weeks ago
| * 626c397 6 weeks ago
| * 0fdb87f 6 weeks ago
| | *   3c0f41c 3 weeks ago  (tag: 2.2.0, origin/master, master)
| | |\
| |_|/
|/| |
* | | 9c11be2 4 weeks ago
* | | 1144e4d 4 weeks ago
* | | 4834988 4 weeks ago
* | | 0a8b80e 4 weeks ago
| | *   54064ae 5 weeks ago  (tag: 2.1.0)
| | |\
| |_|/
|/| |
* | | 8cf5749 5 weeks ago
|/ /
| *   e40a9b5 6 weeks ago  (tag: 2.0.4)
| |\
| |/
|/|
* | 1e14a56 6 weeks ago
* | a1e5689 7 weeks ago
* | 310b2d0 7 weeks ago
* | 1a43795 2 months ago
* | 379f863 2 months ago
* | f2650d0 2 months ago
* | 12ecace 2 months ago
* | 6ec7fbf 2 months ago
* | e165b41 3 months ago
* | e392170 3 months ago
* | db47af5 3 months ago  (tag: 2.0.3, origin/hotfix/auditlog-crash)
* | 53fb883 3 months ago
|/
* c376801 3 months ago
*   3f240ff 3 months ago  (tag: 2.0.1)
|\
* \   4c97437 5 months ago  (tag: 1.0)
|\ \
| | | *   93853dc 3 months ago  (tag: 2.0.0)
| | | |\
| | | |/
| | |/|
| | * | 66cd748 3 months ago
| | * |   9df1931 3 months ago
| | |\ \
| | | * | 3072095 3 months ago
| | * | | 976fe4f 3 months ago
| | * | | e7881ee 3 months ago
| | * | | f65080d 3 months ago
| | |/ /
| | * | 4ef70a4 3 months ago
| | * | faab477 3 months ago
| | * | 5b2eec1 3 months ago
| | * | 65ff487 3 months ago
| | * | 60d32e5 4 months ago
| | * | 8799936 4 months ago
| | * | 61dce08 4 months ago
| | * | 7e0d8ae 4 months ago
| | * | e23d6d9 4 months ago
| | * | 37cb3de 4 months ago
| | * | 5436401 4 months ago
| | * | da8b83a 4 months ago
| | * | d8d798b 4 months ago
| | * | dd56cca 4 months ago

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions