@@ -215,7 +215,7 @@ public void FetchHonorsTheFetchPruneConfigurationEntry()
215215
216216 using ( var clonedRepo = new Repository ( clonedRepoPath ) )
217217 {
218- Assert . Equal ( 5 , clonedRepo . Branches . Count ( b => b . IsRemote ) ) ;
218+ Assert . Equal ( 5 , clonedRepo . Branches . Count ( b => b . IsRemote && b . FriendlyName != "origin/HEAD" ) ) ;
219219
220220 // Drop one of the branches in the remote repository
221221 using ( var sourceRepo = new Repository ( source ) )
@@ -226,17 +226,17 @@ public void FetchHonorsTheFetchPruneConfigurationEntry()
226226 // No pruning when the configuration entry isn't defined
227227 Assert . Null ( clonedRepo . Config . Get < bool > ( "fetch.prune" ) ) ;
228228 Commands . Fetch ( clonedRepo , "origin" , new string [ 0 ] , null , null , null ) ;
229- Assert . Equal ( 5 , clonedRepo . Branches . Count ( b => b . IsRemote ) ) ;
229+ Assert . Equal ( 5 , clonedRepo . Branches . Count ( b => b . IsRemote && b . FriendlyName != "origin/HEAD" ) ) ;
230230
231231 // No pruning when the configuration entry is set to false
232232 clonedRepo . Config . Set < bool > ( "fetch.prune" , false ) ;
233233 Commands . Fetch ( clonedRepo , "origin" , new string [ 0 ] , null , null , null ) ;
234- Assert . Equal ( 5 , clonedRepo . Branches . Count ( b => b . IsRemote ) ) ;
234+ Assert . Equal ( 5 , clonedRepo . Branches . Count ( b => b . IsRemote && b . FriendlyName != "origin/HEAD" ) ) ;
235235
236236 // Auto pruning when the configuration entry is set to true
237237 clonedRepo . Config . Set < bool > ( "fetch.prune" , true ) ;
238238 Commands . Fetch ( clonedRepo , "origin" , new string [ 0 ] , null , null , null ) ;
239- Assert . Equal ( 4 , clonedRepo . Branches . Count ( b => b . IsRemote ) ) ;
239+ Assert . Equal ( 4 , clonedRepo . Branches . Count ( b => b . IsRemote && b . FriendlyName != "origin/HEAD" ) ) ;
240240 }
241241 }
242242
0 commit comments