@@ -601,21 +601,21 @@ public void UpdatingADirectReferenceTargetWithARevparsePointingAtAnUnknownObject
601601 }
602602
603603 [ Fact ]
604- public void CanMoveAReferenceToADeeperReferenceHierarchy ( )
604+ public void CanRenameAReferenceToADeeperReferenceHierarchy ( )
605605 {
606606 string path = CloneBareTestRepo ( ) ;
607607 using ( var repo = new Repository ( path ) )
608608 {
609609 const string newName = "refs/tags/test/deep" ;
610610
611- Reference moved = repo . Refs . Move ( "refs/tags/test" , newName ) ;
612- Assert . NotNull ( moved ) ;
613- Assert . Equal ( newName , moved . CanonicalName ) ;
611+ Reference renamed = repo . Refs . Rename ( "refs/tags/test" , newName ) ;
612+ Assert . NotNull ( renamed ) ;
613+ Assert . Equal ( newName , renamed . CanonicalName ) ;
614614 }
615615 }
616616
617617 [ Fact ]
618- public void CanMoveAReferenceToAUpperReferenceHierarchy ( )
618+ public void CanRenameAReferenceToAUpperReferenceHierarchy ( )
619619 {
620620 string path = CloneBareTestRepo ( ) ;
621621 using ( var repo = new Repository ( path ) )
@@ -624,14 +624,14 @@ public void CanMoveAReferenceToAUpperReferenceHierarchy()
624624 const string oldName = newName + "/mio" ;
625625
626626 repo . Refs . Add ( oldName , repo . Head . CanonicalName ) ;
627- Reference moved = repo . Refs . Move ( oldName , newName ) ;
628- Assert . NotNull ( moved ) ;
629- Assert . Equal ( newName , moved . CanonicalName ) ;
627+ Reference renamed = repo . Refs . Rename ( oldName , newName ) ;
628+ Assert . NotNull ( renamed ) ;
629+ Assert . Equal ( newName , renamed . CanonicalName ) ;
630630 }
631631 }
632632
633633 [ Fact ]
634- public void CanMoveAReferenceToADifferentReferenceHierarchy ( )
634+ public void CanRenameAReferenceToADifferentReferenceHierarchy ( )
635635 {
636636 string path = CloneBareTestRepo ( ) ;
637637 using ( var repo = new Repository ( path ) )
@@ -643,38 +643,38 @@ public void CanMoveAReferenceToADifferentReferenceHierarchy()
643643
644644 var oldId = repo . Refs [ oldName ] . ResolveToDirectReference ( ) . Target . Id ;
645645
646- Reference moved = repo . Refs . Move ( oldName , newName ) ;
647- Assert . NotNull ( moved ) ;
648- Assert . Equal ( newName , moved . CanonicalName ) ;
649- Assert . Equal ( oldId , moved . ResolveToDirectReference ( ) . Target . Id ) ;
646+ Reference renamed = repo . Refs . Rename ( oldName , newName ) ;
647+ Assert . NotNull ( renamed ) ;
648+ Assert . Equal ( newName , renamed . CanonicalName ) ;
649+ Assert . Equal ( oldId , renamed . ResolveToDirectReference ( ) . Target . Id ) ;
650650
651- AssertRefLogEntry ( repo , newName , moved . ResolveToDirectReference ( ) . Target . Id ,
651+ AssertRefLogEntry ( repo , newName , renamed . ResolveToDirectReference ( ) . Target . Id ,
652652 string . Format ( "reference: renamed {0} to {1}" , oldName , newName ) ) ;
653653 }
654654 }
655655
656656 [ Fact ]
657- public void MovingANonExistingReferenceThrows ( )
657+ public void RenamingANonExistingReferenceThrows ( )
658658 {
659659 using ( var repo = new Repository ( BareTestRepoPath ) )
660660 {
661- Assert . Throws < LibGit2SharpException > ( ( ) => repo . Refs . Move ( "refs/tags/i-am-void" , "refs/atic/tagtest" ) ) ;
661+ Assert . Throws < LibGit2SharpException > ( ( ) => repo . Refs . Rename ( "refs/tags/i-am-void" , "refs/atic/tagtest" ) ) ;
662662 }
663663 }
664664
665665 [ Fact ]
666- public void CanMoveAndOverWriteAExistingReference ( )
666+ public void CanRenameAndOverWriteAExistingReference ( )
667667 {
668668 string path = CloneBareTestRepo ( ) ;
669669 using ( var repo = new Repository ( path ) )
670670 {
671671 const string oldName = "refs/heads/packed" ;
672672 const string newName = "refs/heads/br2" ;
673673
674- Reference moved = repo . Refs . Move ( oldName , newName , allowOverwrite : true ) ;
674+ Reference renamed = repo . Refs . Rename ( oldName , newName , allowOverwrite : true ) ;
675675
676676 Assert . Null ( repo . Refs [ oldName ] ) ;
677- Assert . NotNull ( repo . Refs [ moved . CanonicalName ] ) ;
677+ Assert . NotNull ( repo . Refs [ renamed . CanonicalName ] ) ;
678678 }
679679 }
680680
@@ -683,12 +683,12 @@ public void BlindlyOverwritingAExistingReferenceThrows()
683683 {
684684 using ( var repo = new Repository ( BareTestRepoPath ) )
685685 {
686- Assert . Throws < NameConflictException > ( ( ) => repo . Refs . Move ( "refs/heads/packed" , "refs/heads/br2" ) ) ;
686+ Assert . Throws < NameConflictException > ( ( ) => repo . Refs . Rename ( "refs/heads/packed" , "refs/heads/br2" ) ) ;
687687 }
688688 }
689689
690690 [ Fact ]
691- public void MovingAReferenceDoesNotDecreaseTheRefsCount ( )
691+ public void RenamingAReferenceDoesNotDecreaseTheRefsCount ( )
692692 {
693693 string path = CloneBareTestRepo ( ) ;
694694 using ( var repo = new Repository ( path ) )
@@ -699,7 +699,7 @@ public void MovingAReferenceDoesNotDecreaseTheRefsCount()
699699 List < string > refs = repo . Refs . Select ( r => r . CanonicalName ) . ToList ( ) ;
700700 Assert . True ( refs . Contains ( oldName ) ) ;
701701
702- repo . Refs . Move ( oldName , newName ) ;
702+ repo . Refs . Rename ( oldName , newName ) ;
703703
704704 List < string > refs2 = repo . Refs . Select ( r => r . CanonicalName ) . ToList ( ) ;
705705 Assert . False ( refs2 . Contains ( oldName ) ) ;
@@ -710,18 +710,18 @@ public void MovingAReferenceDoesNotDecreaseTheRefsCount()
710710 }
711711
712712 [ Fact ]
713- public void CanLookupAMovedReference ( )
713+ public void CanLookupARenamedReference ( )
714714 {
715715 string path = CloneBareTestRepo ( ) ;
716716 using ( var repo = new Repository ( path ) )
717717 {
718718 const string oldName = "refs/tags/test" ;
719719 const string newName = "refs/atic/tagtest" ;
720720
721- Reference moved = repo . Refs . Move ( oldName , newName ) ;
721+ Reference renamed = repo . Refs . Rename ( oldName , newName ) ;
722722
723723 Reference lookedUp = repo . Refs [ newName ] ;
724- Assert . Equal ( lookedUp , moved ) ;
724+ Assert . Equal ( lookedUp , renamed ) ;
725725 }
726726 }
727727
0 commit comments