@@ -70,17 +70,17 @@ public Branch GetOrCreate(LibGit2Sharp.Branch innerBranch, Diff repoDiff)
7070 return new Branch ( innerBranch , repoDiff , this ) ;
7171 }
7272
73- var cacheKey = $ "{ innerBranch . CanonicalName } | { innerBranch . Tip . Sha } | { innerBranch . RemoteName } ";
74- return cachedBranches . GetOrAdd ( cacheKey , new Branch ( innerBranch , repoDiff , this ) ) ;
73+ var cacheKey = $ "{ innerBranch . RemoteName } / { innerBranch . CanonicalName } @ { innerBranch . Tip . Sha } ";
74+ return cachedBranches . GetOrAdd ( cacheKey , _ => new Branch ( innerBranch , repoDiff , this ) ) ;
7575 }
7676
7777 public Commit GetOrCreate ( LibGit2Sharp . Commit innerCommit , Diff repoDiff ) =>
78- cachedCommits . GetOrAdd ( innerCommit . Sha , new Commit ( innerCommit , repoDiff , this ) ) ;
78+ cachedCommits . GetOrAdd ( innerCommit . Sha , _ => new Commit ( innerCommit , repoDiff , this ) ) ;
7979
8080 public Tag GetOrCreate ( LibGit2Sharp . Tag innerTag , Diff repoDiff )
8181 {
82- var cacheKey = $ "{ innerTag . CanonicalName } | { innerTag . Target . Sha } ";
83- return cachedTags . GetOrAdd ( cacheKey , new Tag ( innerTag , repoDiff , this ) ) ;
82+ var cacheKey = $ "{ innerTag . CanonicalName } @ { innerTag . Target . Sha } ";
83+ return cachedTags . GetOrAdd ( cacheKey , _ => new Tag ( innerTag , repoDiff , this ) ) ;
8484 }
8585
8686 public void Dispose ( )
0 commit comments