@@ -218,15 +218,15 @@ To disable this error set an environmental variable called IGNORE_NORMALISATION_
218218
219219 private void EnsureHeadIsAttachedToBranch ( string ? currentBranchName , AuthenticationInfo authentication )
220220 {
221- var headSha = this . repository . Refs . Head ? . TargetIdentifier ;
221+ var headSha = this . repository . References . Head ? . TargetIdentifier ;
222222 if ( ! this . repository . IsHeadDetached )
223223 {
224224 this . log . Info ( $ "HEAD points at branch '{ headSha } '.") ;
225225 return ;
226226 }
227227
228228 this . log . Info ( $ "HEAD is detached and points at commit '{ headSha } '.") ;
229- var localRefs = this . repository . Refs . FromGlob ( "*" ) . Select ( r => $ "{ r . Name . Canonical } ({ r . TargetIdentifier } )") ;
229+ var localRefs = this . repository . References . FromGlob ( "*" ) . Select ( r => $ "{ r . Name . Canonical } ({ r . TargetIdentifier } )") ;
230230 this . log . Info ( $ "Local Refs:{ FileSystemHelper . Path . NewLine } " + string . Join ( FileSystemHelper . Path . NewLine , localRefs ) ) ;
231231
232232 // In order to decide whether a fake branch is required or not, first check to see if any local branches have the same commit SHA of the head SHA.
@@ -331,7 +331,7 @@ private void CreateOrUpdateLocalBranchesFromRemoteTrackingOnes(string remoteName
331331 var prefix = $ "refs/remotes/{ remoteName } /";
332332 var remoteHeadCanonicalName = $ "{ prefix } HEAD";
333333 var headReferenceName = ReferenceName . Parse ( remoteHeadCanonicalName ) ;
334- var remoteTrackingReferences = this . repository . Refs
334+ var remoteTrackingReferences = this . repository . References
335335 . FromGlob ( prefix + "*" )
336336 . Where ( r => ! r . Name . Equals ( headReferenceName ) ) ;
337337
@@ -344,7 +344,7 @@ private void CreateOrUpdateLocalBranchesFromRemoteTrackingOnes(string remoteName
344344 // We do not want to touch our current branch
345345 if ( this . repository . Head . Name . EquivalentTo ( branchName ) ) continue ;
346346
347- var localRef = this . repository . Refs [ localReferenceName ] ;
347+ var localRef = this . repository . References [ localReferenceName ] ;
348348 if ( localRef != null )
349349 {
350350 if ( localRef . TargetIdentifier == remoteTrackingReference . TargetIdentifier )
@@ -356,13 +356,13 @@ private void CreateOrUpdateLocalBranchesFromRemoteTrackingOnes(string remoteName
356356 if ( remoteRefTipId != null )
357357 {
358358 this . log . Info ( $ "Updating local ref '{ localRef . Name . Canonical } ' to point at { remoteRefTipId } .") ;
359- this . retryAction . Execute ( ( ) => this . repository . Refs . UpdateTarget ( localRef , remoteRefTipId ) ) ;
359+ this . retryAction . Execute ( ( ) => this . repository . References . UpdateTarget ( localRef , remoteRefTipId ) ) ;
360360 }
361361 continue ;
362362 }
363363
364364 this . log . Info ( $ "Creating local branch from remote tracking '{ remoteTrackingReference . Name . Canonical } '.") ;
365- this . repository . Refs . Add ( localReferenceName . Canonical , remoteTrackingReference . TargetIdentifier , true ) ;
365+ this . repository . References . Add ( localReferenceName . Canonical , remoteTrackingReference . TargetIdentifier , true ) ;
366366
367367 var branch = this . repository . Branches [ branchName ] ;
368368 if ( branch != null )
@@ -406,17 +406,17 @@ public void EnsureLocalBranchExistsForCurrentBranch(IRemote remote, string? curr
406406 this . log . Info ( isLocalBranch
407407 ? $ "Creating local branch { referenceName } "
408408 : $ "Creating local branch { referenceName } pointing at { repoTipId } ") ;
409- this . repository . Refs . Add ( localCanonicalName , repoTipId . Sha ) ;
409+ this . repository . References . Add ( localCanonicalName , repoTipId . Sha ) ;
410410 }
411411 else
412412 {
413413 this . log . Info ( isLocalBranch
414414 ? $ "Updating local branch { referenceName } to point at { repoTipId } "
415415 : $ "Updating local branch { referenceName } to match ref { currentBranch } ") ;
416- var localRef = this . repository . Refs [ localCanonicalName ] ;
416+ var localRef = this . repository . References [ localCanonicalName ] ;
417417 if ( localRef != null )
418418 {
419- this . retryAction . Execute ( ( ) => this . repository . Refs . UpdateTarget ( localRef , repoTipId ) ) ;
419+ this . retryAction . Execute ( ( ) => this . repository . References . UpdateTarget ( localRef , repoTipId ) ) ;
420420 }
421421 }
422422 }
0 commit comments