Skip to content

LibGit2Sharp.NameConflictException: Failed to write reference 'refs/heads/feature/Morpheus_v12.2': a reference with that name already exists. #864

@jwhite

Description

@jwhite

Sorry, I'm just starting to look at this but I have an exception that occurs only on 1 branch that we have. The rest are working.

This is in version 3.5.3 building on a TFS vNext agent.

`ERROR [05/18/16 11:44:42:43] An unexpected error occurred:

2016-05-17T23:44:42.4352442Z LibGit2Sharp.NameConflictException: Failed to write reference 'refs/heads/feature/Morpheus_v12.2': a reference with that name already exists.
 2016-05-17T23:44:42.4352442Z    at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
 2016-05-17T23:44:42.4352442Z    at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result)
 2016-05-17T23:44:42.4352442Z    at LibGit2Sharp.Core.Proxy.git_reference_create(RepositoryHandle repo, String name, ObjectId targetId, Boolean allowOverwrite, String logMessage)
2016-05-17T23:44:42.4352442Z    at LibGit2Sharp.ReferenceCollection.Add(String name, ObjectId targetId, String logMessage, Boolean allowOverwrite)
2016-05-17T23:44:42.4352442Z    at LibGit2Sharp.ReferenceCollection.Add(String name, ObjectId targetId)
2016-05-17T23:44:42.4352442Z    at GitTools.Git.GitRepositoryHelper.EnsureLocalBranchExistsForCurrentBranch(Repository repo, String currentBranch)
2016-05-17T23:44:42.4352442Z    at GitTools.Git.GitRepositoryHelper.NormalizeGitDirectory(String gitDirectory, AuthenticationInfo authentication, Boolean noFetch, String currentBranch)
2016-05-17T23:44:42.4352442Z    at GitVersion.GitPreparer.Initialise(Boolean normaliseGitDirectory, String currentBranch)
2016-05-17T23:44:42.4352442Z    at GitVersion.ExecuteCore.ExecuteInternal(String targetBranch, String commitId, IRepository repo, GitPreparer gitPreparer, String projectRoot, IBuildServer buildServer, Config overrideConfig)
2016-05-17T23:44:42.4352442Z    at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig)
2016-05-17T23:44:42.4352442Z    at GitVersion.SpecifiedArgumentRunner.Run(Arguments arguments, IFileSystem fileSystem)
2016-05-17T23:44:42.4352442Z    at GitVersion.Program.VerifyArgumentsAndRun()
2016-05-17T23:44:42.4352442Z INFO [05/18/16 11:44:42:43] 
2016-05-17T23:44:42.4352442Z INFO [05/18/16 11:44:42:43] Here is the current git graph (please include in issue): 
2016-05-17T23:44:42.4352442Z INFO [05/18/16 11:44:42:43] Showing max of 100 commits
2016-05-17T23:44:43.3258635Z INFO [05/18/16 11:44:43:32] *   e1e8217 47 minutes ago  (HEAD, origin/Feature/Morpheus_v12.2)
2016-05-17T23:44:43.3258635Z |\  
2016-05-17T23:44:43.3258635Z | | * 497957a 58 minutes ago  (origin/pull/US751)
2016-05-17T23:44:43.3414884Z | | *   daf77dc 2 hours ago 
2016-05-17T23:44:43.3414884Z | | |\  
2016-05-17T23:44:43.3414884Z | |_|/  
2016-05-17T23:44:43.3414884Z |/| |   
2016-05-17T23:44:43.3414884Z * | |   4d340a3 2 hours ago 
2016-05-17T23:44:43.3414884Z |\ \ \  
2016-05-17T23:44:43.3414884Z | * \ \   f5d110e 21 hours ago  (Feature/Morpheus_v12.2)
2016-05-17T23:44:43.3414884Z | |\ \ \  
2016-05-17T23:44:43.3414884Z | | * \ \   7c614e2 2 days ago  (origin/pull/US968, pull/US968)
2016-05-17T23:44:43.3414884Z | | |\ \ \  
2016-05-17T23:44:43.3414884Z | | * | | | 4b6cb49 2 days ago 
2016-05-17T23:44:43.3414884Z * | | | | | 8858504 2 hours ago 
2016-05-17T23:44:43.3414884Z |/ / / / /  
2016-05-17T23:44:43.3414884Z | | | | * 853b994 2 hours ago 
2016-05-17T23:44:43.3414884Z | | | | * 5245501 21 hours ago 
2016-05-17T23:44:43.3414884Z | |_|_|/  
2016-05-17T23:44:43.3414884Z |/| | |   
2016-05-17T23:44:43.3414884Z * | | |   0ca06fd 22 hours ago 
2016-05-17T23:44:43.3414884Z |\ \ \ \  
2016-05-17T23:44:43.3414884Z | |_|/ /  
2016-05-17T23:44:43.3414884Z |/| | |   
2016-05-17T23:44:43.3414884Z | | | | *   32923d9 3 hours ago  (origin/Feature/VRecalls)
2016-05-17T23:44:43.3414884Z | | | | |\  
2016-05-17T23:44:43.3414884Z | | | | |/  
2016-05-17T23:44:43.3571133Z | | | |/|   
2016-05-17T23:44:43.3571133Z | | | * |   7aa63d9 3 hours ago  (origin/master, master)
2016-05-17T23:44:43.3571133Z | | | |\ \  
2016-05-17T23:44:43.3571133Z | | | | * | 027a9e5 3 hours ago 
2016-05-17T23:44:43.3571133Z | | | |/ /  
2016-05-17T23:44:43.3571133Z | | | * |   9625f39 4 hours ago 
2016-05-17T23:44:43.3571133Z | | | |\ \  
2016-05-17T23:44:43.3571133Z | | | | * | 2da01c4 4 hours ago 
2016-05-17T23:44:43.3571133Z | | | * | |   3e808dc 19 hours ago 
2016-05-17T23:44:43.3571133Z | | | |\ \ \  
2016-05-17T23:44:43.3571133Z | | | | * | | a87dd32 20 hours ago 
2016-05-17T23:44:43.3571133Z | | | | * | |   279f6cf 20 hours ago 
2016-05-17T23:44:43.3571133Z | | | | |\ \ \  
2016-05-17T23:44:43.3571133Z | | | | | * | | 1eb4bd6 20 hours ago 
2016-05-17T23:44:43.3571133Z | | |_|_|/ / /  
2016-05-17T23:44:43.3571133Z | |/| | | | |   
2016-05-17T23:44:43.3571133Z | | | | * | | 4b846e7 20 hours ago 
2016-05-17T23:44:43.3571133Z | | |_|/ / /  
2016-05-17T23:44:43.3571133Z | |/| | | |   
2016-05-17T23:44:43.3571133Z | | | * | |   36918e5 20 hours ago 
2016-05-17T23:44:43.3571133Z | | | |\ \ \  
2016-05-17T23:44:43.3571133Z | | |/ / / /  
2016-05-17T23:44:43.3571133Z | |/| | | |   
2016-05-17T23:44:43.3571133Z | | | * | | 01e3c52 21 hours ago 
2016-05-17T23:44:43.3571133Z | | |/ / /  
2016-05-17T23:44:43.3571133Z | |/| | |   
2016-05-17T23:44:43.3571133Z | | | | *   9cc356b 21 hours ago  (Feature/VRecalls)
2016-05-17T23:44:43.3571133Z | | | | |\  
2016-05-17T23:44:43.3571133Z | | | | | * de88a2a 21 hours ago 
2016-05-17T23:44:43.3571133Z | | | | | *   4ad26d2 21 hours ago 
2016-05-17T23:44:43.3571133Z | | | | | |\  
2016-05-17T23:44:43.3571133Z | | | | | | *   dfb8e2a 22 hours ago 
2016-05-17T23:44:43.3571133Z | | | | | | |\  
2016-05-17T23:44:43.3571133Z | | |_|_|_|_|/  
2016-05-17T23:44:43.3571133Z | |/| | | | |   
2016-05-17T23:44:43.3571133Z | * | | | | |   726e6cb 24 hours ago 
2016-05-17T23:44:43.3571133Z | |\ \ \ \ \ \  
2016-05-17T23:44:43.3571133Z | | * | | | | | 5856f76 25 hours ago  (origin/pull/M49638, pull/M49638)
2016-05-17T23:44:43.3727382Z | | * | | | | | c9f186c 2 days ago 
2016-05-17T23:44:43.3727382Z | * | | | | | |   53a095b 24 hours ago 
2016-05-17T23:44:43.3727382Z | |\ \ \ \ \ \ \  
2016-05-17T23:44:43.3727382Z | | * | | | | | | a71dff4 2 days ago  (origin/pull/lightinstaller, pull/lightinstaller)
2016-05-17T23:44:43.3727382Z | | * | | | | | | 14b9c79 2 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | 11e2e91 2 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | 78c956a 2 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | cae8e9d 2 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | 7f08e37 2 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | 3c3d76a 2 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | a4ffa79 2 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | d6d5d4b 2 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | be6aef8 2 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | 3c16f81 5 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | c4a47f8 5 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | 0d1e995 5 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | bbcc78c 5 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | | 53680e0 5 days ago 
2016-05-17T23:44:43.3727382Z | | * | | | | | |   e5cdff6 6 days ago 
2016-05-17T23:44:43.3727382Z | | |\ \ \ \ \ \ \  
2016-05-17T23:44:43.3727382Z | | | | |/ / / / /  
2016-05-17T23:44:43.3727382Z | | | |/| | | | |   
2016-05-17T23:44:43.3727382Z | | * | | | | | | 47c468d 6 days ago 
2016-05-17T23:44:43.3727382Z | * | | | | | | |   e5850f1 25 hours ago 
2016-05-17T23:44:43.3727382Z | |\ \ \ \ \ \ \ \  
2016-05-17T23:44:43.3727382Z | | |_|_|_|/ / / /  
2016-05-17T23:44:43.3727382Z | |/| | | | | | |   
2016-05-17T23:44:43.3727382Z | * | | | | | | |   c2eb9ac 26 hours ago 
2016-05-17T23:44:43.3727382Z | |\ \ \ \ \ \ \ \  
2016-05-17T23:44:43.3727382Z | | * \ \ \ \ \ \ \   628b35b 2 days ago  (origin/pull/M49556, pull/M49556)
2016-05-17T23:44:43.3727382Z | | |\ \ \ \ \ \ \ \  
2016-05-17T23:44:43.3727382Z | | |/ / / / / / / /  
2016-05-17T23:44:43.3727382Z | |/| | | | | | | |   
2016-05-17T23:44:43.3727382Z | | * | | | | | | | df15870 6 weeks ago  (origin/M49556, M49556)
2016-05-17T23:44:43.3727382Z | | | | | | | | * |   892a7c0 23 hours ago 
2016-05-17T23:44:43.3727382Z | | | | | | | | |\ \  
2016-05-17T23:44:43.3727382Z | | | | | | | | | |/  
2016-05-17T23:44:43.3727382Z | | | | | | | | * |   a119604 25 hours ago 
2016-05-17T23:44:43.3883631Z | | | | | | | | |\ \  
2016-05-17T23:44:43.3883631Z | | | | | | | | * | | 392e639 25 hours ago 
2016-05-17T23:44:43.3883631Z | | | | | | | * | | | 602ab82 21 hours ago 
2016-05-17T23:44:43.3883631Z | | | | | | | | |_|/  
2016-05-17T23:44:43.3883631Z | | | | | | | |/| |   
2016-05-17T23:44:43.3883631Z | | | | | | | * | |   d31cda9 24 hours ago 
2016-05-17T23:44:43.3883631Z | | | | | | | |\ \ \  
2016-05-17T23:44:43.3883631Z | | | | | | | | * \ \   6565e63 24 hours ago 
2016-05-17T23:44:43.3883631Z | | | | | | | | |\ \ \  
2016-05-17T23:44:43.3883631Z | | | | | | | | | * \ \   b6e60fc 2 days ago 
2016-05-17T23:44:43.3883631Z | | | | | | | | | |\ \ \  
2016-05-17T23:44:43.3883631Z | | |_|_|_|_|_|_|_|/ / /  
2016-05-17T23:44:43.3883631Z | |/| | | | | | | | | |   
2016-05-17T23:44:43.3883631Z | * | | | | | | | | | |   04518f5 2 days ago  (origin/Feature/MedicalHistoryFix, origin/Feature/M47228-DAFAlerts, Feature/MedicalHistoryFix, Feature/M47228-DAFAlerts)
2016-05-17T23:44:43.3883631Z | |\ \ \ \ \ \ \ \ \ \ \  
2016-05-17T23:44:43.3883631Z | * \ \ \ \ \ \ \ \ \ \ \   24a1fc5 2 days ago 
2016-05-17T23:44:43.3883631Z | |\ \ \ \ \ \ \ \ \ \ \ \  
2016-05-17T23:44:43.3883631Z | | |_|_|_|_|_|/ / / / / /  
2016-05-17T23:44:43.3883631Z | |/| | | | | | | | | | |   
2016-05-17T23:44:43.3883631Z | | | | | | | | | | * | | 1d0ce6c 2 days ago 
2016-05-17T23:44:43.3883631Z | | |_|_|_|_|_|_|_|/ / /  
2016-05-17T23:44:43.3883631Z | |/| | | | | | | | | |   
2016-05-17T23:44:43.3883631Z | | | | | | | | * | | | 9cdedf7 24 hours ago 
2016-05-17T23:44:43.3883631Z | | | | | | | | |/ / /  
2016-05-17T23:44:43.3883631Z | | | | | | | | * | | 9a185e6 24 hours ago 
2016-05-17T23:44:43.3883631Z | | | | | | | | | |/  
2016-05-17T23:44:43.3883631Z | | | | | | | | |/|   
2016-05-17T23:44:43.3883631Z | | | | | | | | * | 874d120 25 hours ago 
2016-05-17T23:44:43.3883631Z | | | | | | | | * | 4d72ce0 2 days ago 
2016-05-17T23:44:43.3883631Z | | | | | | | | |/  
2016-05-17T23:44:43.3883631Z | | | | | | | | * 4f445a3 2 days ago 
2016-05-17T23:44:43.3883631Z | | |_|_|_|_|_|/  
2016-05-17T23:44:43.3883631Z | |/| | | | | |   
2016-05-17T23:44:43.3883631Z | | | | | | | | * 2289d18 20 hours ago  (origin/pull/TFS-949, pull/TFS-949)
2016-05-17T23:44:43.3883631Z | |_|_|_|_|_|_|/  
2016-05-17T23:44:43.3883631Z |/| | | | | | |   
2016-05-17T23:44:43.3883631Z * | | | | | | |   94f3b17 2 days ago 
2016-05-17T23:44:43.4039880Z |\ \ \ \ \ \ \ \  
2016-05-17T23:44:43.4039880Z | * | | | | | | | 2412edc 5 days ago  (origin/pull/US962, pull/US962)
2016-05-17T23:44:43.4039880Z | | |_|_|_|_|_|/  
2016-05-17T23:44:43.4039880Z | |/| | | | | |   
2016-05-17T23:44:43.4039880Z * | | | | | | |   48ae8c6 2 days ago 
2016-05-17T23:44:43.4039880Z |\ \ \ \ \ \ \ \  
2016-05-17T23:44:43.4039880Z | |/ / / / / / /  
2016-05-17T23:44:43.4039880Z |/| | | | | | |   

2016-05-17T23:44:43.4039880Z | * | | | | | | fdc04f5 2 days ago  (origin/pull/US966, pull/US966)
 <snip>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions