@@ -551,14 +551,14 @@ public void CanGetTrackingInformationForLocalTrackingBranch()
551
551
}
552
552
553
553
[ Fact ]
554
- public void MovingARemoteTrackingBranchThrows ( )
554
+ public void RenamingARemoteTrackingBranchThrows ( )
555
555
{
556
556
using ( var repo = new Repository ( StandardTestRepoPath ) )
557
557
{
558
558
Branch master = repo . Branches [ "refs/remotes/origin/master" ] ;
559
559
Assert . True ( master . IsRemote ) ;
560
560
561
- Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Move ( master , "new_name" , true ) ) ;
561
+ Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Rename ( master , "new_name" , true ) ) ;
562
562
}
563
563
}
564
564
@@ -821,7 +821,7 @@ public void TwoBranchesPointingAtTheSameCommitAreNotBothCurrent()
821
821
}
822
822
823
823
[ Fact ]
824
- public void CanMoveABranch ( )
824
+ public void CanRenameABranch ( )
825
825
{
826
826
string path = CloneBareTestRepo ( ) ;
827
827
using ( var repo = new Repository ( path ) )
@@ -832,7 +832,7 @@ public void CanMoveABranch()
832
832
var br2 = repo . Branches [ "br2" ] ;
833
833
Assert . NotNull ( br2 ) ;
834
834
835
- Branch newBranch = repo . Branches . Move ( "br2" , "br3" ) ;
835
+ Branch newBranch = repo . Branches . Rename ( "br2" , "br3" ) ;
836
836
837
837
Assert . Equal ( "br3" , newBranch . Name ) ;
838
838
@@ -846,16 +846,16 @@ public void CanMoveABranch()
846
846
}
847
847
848
848
[ Fact ]
849
- public void BlindlyMovingABranchOverAnExistingOneThrows ( )
849
+ public void BlindlyRenamingABranchOverAnExistingOneThrows ( )
850
850
{
851
851
using ( var repo = new Repository ( BareTestRepoPath ) )
852
852
{
853
- Assert . Throws < NameConflictException > ( ( ) => repo . Branches . Move ( "br2" , "test" ) ) ;
853
+ Assert . Throws < NameConflictException > ( ( ) => repo . Branches . Rename ( "br2" , "test" ) ) ;
854
854
}
855
855
}
856
856
857
857
[ Fact ]
858
- public void CanMoveABranchWhileOverwritingAnExistingOne ( )
858
+ public void CanRenameABranchWhileOverwritingAnExistingOne ( )
859
859
{
860
860
string path = CloneBareTestRepo ( ) ;
861
861
using ( var repo = new Repository ( path ) )
@@ -868,7 +868,7 @@ public void CanMoveABranchWhileOverwritingAnExistingOne()
868
868
Branch br2 = repo . Branches [ "br2" ] ;
869
869
Assert . NotNull ( br2 ) ;
870
870
871
- Branch newBranch = repo . Branches . Move ( "br2" , "test" , true ) ;
871
+ Branch newBranch = repo . Branches . Rename ( "br2" , "test" , true ) ;
872
872
Assert . Equal ( "test" , newBranch . Name ) ;
873
873
874
874
Assert . Null ( repo . Branches [ "br2" ] ) ;
@@ -1000,18 +1000,18 @@ public void CreatingABranchIncludesTheCorrectReflogEntries()
1000
1000
}
1001
1001
1002
1002
[ Fact ]
1003
- public void MovingABranchIncludesTheCorrectReflogEntries ( )
1003
+ public void RenamingABranchIncludesTheCorrectReflogEntries ( )
1004
1004
{
1005
1005
string path = CloneStandardTestRepo ( ) ;
1006
1006
using ( var repo = new Repository ( path ) )
1007
1007
{
1008
1008
EnableRefLog ( repo ) ;
1009
1009
var master = repo . Branches [ "master" ] ;
1010
- var newMaster = repo . Branches . Move ( master , "new-master" ) ;
1010
+ var newMaster = repo . Branches . Rename ( master , "new-master" ) ;
1011
1011
AssertRefLogEntry ( repo , newMaster . CanonicalName , newMaster . Tip . Id ,
1012
1012
"branch: renamed refs/heads/master to refs/heads/new-master" ) ;
1013
1013
1014
- newMaster = repo . Branches . Move ( newMaster , "new-master2" , null , "MOVE" ) ;
1014
+ newMaster = repo . Branches . Rename ( newMaster , "new-master2" , null , "MOVE" ) ;
1015
1015
AssertRefLogEntry ( repo , newMaster . CanonicalName , newMaster . Tip . Id , "MOVE" ) ;
1016
1016
}
1017
1017
}
0 commit comments