@@ -30,6 +30,7 @@ public static ICommit CreateMockCommit()
3030        commit . When . Returns ( when . AddSeconds ( 1 ) ) ; 
3131        return  commit ; 
3232    } 
33+ 
3334    public  static IBranch  CreateMockBranch ( string  name ,  params  ICommit [ ]  commits ) 
3435    { 
3536        var  branch  =  Substitute . For < IBranch > ( ) ; 
@@ -55,13 +56,13 @@ public static void DiscoverRepository(this IServiceProvider sp)
5556
5657    public  static IBranch  FindBranch ( this  IGitRepository  repository ,  string  branchName ) 
5758        =>  repository . Branches . FirstOrDefault ( branch =>  branch . Name . WithoutOrigin  ==  branchName ) 
58-              ??  throw  new  GitVersionException ( $ "Branch { branchName }  not found") ; 
59+            ??  throw  new  GitVersionException ( $ "Branch { branchName }  not found") ; 
5960
6061    public  static void  DumpGraph ( this  IGitRepository  repository ,  Action < string > ?  writer  =  null ,  int ?  maxCommits  =  null ) 
61-         =>  GitExtensions . DumpGraph ( repository . Path ,  writer ,  maxCommits ) ; 
62+         =>  DumpGraph ( repository . Path ,  writer ,  maxCommits ) ; 
6263
6364    public  static void  DumpGraph ( this  IRepository  repository ,  Action < string > ?  writer  =  null ,  int ?  maxCommits  =  null ) 
64-         =>  GitExtensions . DumpGraph ( repository . ToGitRepository ( ) . Path ,  writer ,  maxCommits ) ; 
65+         =>  DumpGraph ( repository . ToGitRepository ( ) . Path ,  writer ,  maxCommits ) ; 
6566
6667    public  static GitVersionVariables  GetVersion ( this  RepositoryFixtureBase  fixture ,  IGitVersionConfiguration ?  configuration  =  null , 
6768        IRepository ?  repository  =  null ,  string ?  commitId  =  null ,  bool  onlyTrackedBranches  =  true ,  string ?  targetBranch  =  null ) 
@@ -173,4 +174,7 @@ private static IServiceProvider ConfigureServices(Action<IServiceCollection>? se
173174        servicesOverrides ? . Invoke ( services ) ; 
174175        return  services . BuildServiceProvider ( ) ; 
175176    } 
177+ 
178+     private  static void  DumpGraph ( string  workingDirectory ,  Action < string > ?  writer  =  null ,  int ?  maxCommits  =  null ) 
179+         =>  GitTestExtensions . ExecuteGitCmd ( GitExtensions . CreateGitLogArgs ( maxCommits ) ,  workingDirectory ,  writer ) ; 
176180} 
0 commit comments