@@ -26,7 +26,7 @@ public void CanCreateBranch(string name)
2626
2727 Branch newBranch = repo . CreateBranch ( name , committish ) ;
2828 Assert . NotNull ( newBranch ) ;
29- Assert . Equal ( name , newBranch . Name ) ;
29+ Assert . Equal ( name , newBranch . FriendlyName ) ;
3030 Assert . Equal ( "refs/heads/" + name , newBranch . CanonicalName ) ;
3131 Assert . NotNull ( newBranch . Tip ) ;
3232 Assert . Equal ( committish , newBranch . Tip . Sha ) ;
@@ -36,15 +36,15 @@ public void CanCreateBranch(string name)
3636 // when they're read back:
3737 // - from InlineData: C5-00-6E-00-67-00-73-00-74-00-72-00-F6-00-6D-00
3838 // - from filesystem: 41-00-0A-03-6E-00-67-00-73-00-74-00-72-00-6F-00-08-03-6D-00
39- Assert . NotNull ( repo . Branches . SingleOrDefault ( p => p . Name . Normalize ( ) == name ) ) ;
39+ Assert . NotNull ( repo . Branches . SingleOrDefault ( p => p . FriendlyName . Normalize ( ) == name ) ) ;
4040
4141 AssertRefLogEntry ( repo , newBranch . CanonicalName ,
4242 "branch: Created from " + committish ,
4343 null ,
4444 newBranch . Tip . Id ,
4545 Constants . Identity , DateTimeOffset . Now ) ;
4646
47- repo . Branches . Remove ( newBranch . Name ) ;
47+ repo . Branches . Remove ( newBranch . FriendlyName ) ;
4848 Assert . Null ( repo . Branches [ name ] ) ;
4949 }
5050 }
@@ -122,12 +122,12 @@ public void CanCreateBranchFromImplicitHead(string headCommitOrBranchSpec)
122122 const string name = "unit_test" ;
123123 Branch newBranch = repo . CreateBranch ( name ) ;
124124 Assert . NotNull ( newBranch ) ;
125- Assert . Equal ( name , newBranch . Name ) ;
125+ Assert . Equal ( name , newBranch . FriendlyName ) ;
126126 Assert . Equal ( "refs/heads/" + name , newBranch . CanonicalName ) ;
127127 Assert . False ( newBranch . IsCurrentRepositoryHead ) ;
128128 Assert . NotNull ( newBranch . Tip ) ;
129129 Assert . Equal ( "32eab9cb1f450b5fe7ab663462b77d7f4b703344" , newBranch . Tip . Sha ) ;
130- Assert . NotNull ( repo . Branches . SingleOrDefault ( p => p . Name == name ) ) ;
130+ Assert . NotNull ( repo . Branches . SingleOrDefault ( p => p . FriendlyName == name ) ) ;
131131
132132 AssertRefLogEntry ( repo , newBranch . CanonicalName ,
133133 "branch: Created from " + headCommitOrBranchSpec ,
@@ -303,7 +303,7 @@ public void CanListAllBranches()
303303 string path = SandboxBareTestRepo ( ) ;
304304 using ( var repo = new Repository ( path ) )
305305 {
306- Assert . Equal ( expectedBranches , SortedBranches ( repo . Branches , b => b . Name ) ) ;
306+ Assert . Equal ( expectedBranches , SortedBranches ( repo . Branches , b => b . FriendlyName ) ) ;
307307
308308 Assert . Equal ( 5 , repo . Branches . Count ( ) ) ;
309309 }
@@ -324,7 +324,7 @@ public void CanListBranchesWithRemoteAndLocalBranchWithSameShortName()
324324 } ;
325325
326326 Assert . Equal ( expectedWdBranches ,
327- SortedBranches ( repo . Branches . Where ( b => ! b . IsRemote ) , b => b . Name ) ) ;
327+ SortedBranches ( repo . Branches . Where ( b => ! b . IsRemote ) , b => b . FriendlyName ) ) ;
328328 }
329329 }
330330
@@ -341,7 +341,7 @@ public void CanListAllBranchesWhenGivenWorkingDir()
341341 "origin/test"
342342 } ;
343343
344- Assert . Equal ( expectedWdBranches , SortedBranches ( repo . Branches , b => b . Name ) ) ;
344+ Assert . Equal ( expectedWdBranches , SortedBranches ( repo . Branches , b => b . FriendlyName ) ) ;
345345 }
346346 }
347347
@@ -366,7 +366,7 @@ public void CanListAllBranchesIncludingRemoteRefs()
366366 new { Name = "origin/test" , Sha = "e90810b8df3e80c413d903f631643c716887138d" , IsRemote = true } ,
367367 } ;
368368 Assert . Equal ( expectedBranchesIncludingRemoteRefs ,
369- SortedBranches ( repo . Branches , b => new { b . Name , b . Tip . Sha , b . IsRemote } ) ) ;
369+ SortedBranches ( repo . Branches , b => new { Name = b . FriendlyName , b . Tip . Sha , b . IsRemote } ) ) ;
370370 }
371371 }
372372
@@ -483,11 +483,11 @@ public void CanLookupABranchByItsCanonicalName()
483483 {
484484 Branch branch = repo . Branches [ "refs/heads/br2" ] ;
485485 Assert . NotNull ( branch ) ;
486- Assert . Equal ( "br2" , branch . Name ) ;
486+ Assert . Equal ( "br2" , branch . FriendlyName ) ;
487487
488488 Branch branch2 = repo . Branches [ "refs/heads/br2" ] ;
489489 Assert . NotNull ( branch2 ) ;
490- Assert . Equal ( "br2" , branch2 . Name ) ;
490+ Assert . Equal ( "br2" , branch2 . FriendlyName ) ;
491491
492492 Assert . Equal ( branch , branch2 ) ;
493493 Assert . True ( ( branch2 == branch ) ) ;
@@ -503,7 +503,7 @@ public void CanLookupLocalBranch()
503503 Branch master = repo . Branches [ "master" ] ;
504504 Assert . NotNull ( master ) ;
505505 Assert . False ( master . IsRemote ) ;
506- Assert . Equal ( "master" , master . Name ) ;
506+ Assert . Equal ( "master" , master . FriendlyName ) ;
507507 Assert . Equal ( "refs/heads/master" , master . CanonicalName ) ;
508508 Assert . True ( master . IsCurrentRepositoryHead ) ;
509509 Assert . Equal ( "4c062a6361ae6959e06292c1fa5e2822d9c96345" , master . Tip . Sha ) ;
@@ -551,7 +551,7 @@ public void CanGetInformationFromUnbornBranch()
551551 Assert . Equal ( 0 , head . Commits . Count ( ) ) ;
552552 Assert . True ( head . IsCurrentRepositoryHead ) ;
553553 Assert . False ( head . IsRemote ) ;
554- Assert . Equal ( "master" , head . Name ) ;
554+ Assert . Equal ( "master" , head . FriendlyName ) ;
555555 Assert . Null ( head . Tip ) ;
556556 Assert . Null ( head [ "huh?" ] ) ;
557557
@@ -916,7 +916,7 @@ public void RemovingABranchWhichIsTheCurrentHeadThrows()
916916 string path = SandboxBareTestRepo ( ) ;
917917 using ( var repo = new Repository ( path ) )
918918 {
919- Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Remove ( repo . Head . Name ) ) ;
919+ Assert . Throws < LibGit2SharpException > ( ( ) => repo . Branches . Remove ( repo . Head . FriendlyName ) ) ;
920920 }
921921 }
922922
@@ -988,7 +988,7 @@ public void CanRenameABranch()
988988
989989 Branch newBranch = repo . Branches . Rename ( "br2" , "br3" ) ;
990990
991- Assert . Equal ( "br3" , newBranch . Name ) ;
991+ Assert . Equal ( "br3" , newBranch . FriendlyName ) ;
992992
993993 Assert . Null ( repo . Branches [ "br2" ] ) ;
994994 Assert . NotNull ( repo . Branches [ "br3" ] ) ;
@@ -1026,7 +1026,7 @@ public void CanRenameABranchWhileOverwritingAnExistingOne()
10261026 Assert . NotNull ( br2 ) ;
10271027
10281028 Branch newBranch = repo . Branches . Rename ( "br2" , "test" , true ) ;
1029- Assert . Equal ( "test" , newBranch . Name ) ;
1029+ Assert . Equal ( "test" , newBranch . FriendlyName ) ;
10301030
10311031 Assert . Null ( repo . Branches [ "br2" ] ) ;
10321032
@@ -1085,7 +1085,7 @@ public void TrackedBranchExistsFromDefaultConfigInEmptyClone()
10851085 using ( var repo = new Repository ( clonedRepoPath ) )
10861086 {
10871087 Assert . Empty ( Directory . GetFiles ( scd2 . RootedDirectoryPath ) ) ;
1088- Assert . Equal ( repo . Head . Name , "master" ) ;
1088+ Assert . Equal ( repo . Head . FriendlyName , "master" ) ;
10891089
10901090 Assert . Null ( repo . Head . Tip ) ;
10911091 Assert . NotNull ( repo . Head . TrackedBranch ) ;
0 commit comments