@@ -93,7 +93,7 @@ public void CanMergeRepoNonFastForward(bool shouldMergeOccurInDetachedHeadState)
9393 using ( var repo = new Repository ( path ) )
9494 {
9595 var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
96- repo . Checkout ( firstBranch ) ;
96+ Commands . Checkout ( repo , firstBranch ) ;
9797 var originalTreeCount = firstBranch . Tip . Tree . Count ;
9898
9999 // Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
@@ -106,11 +106,11 @@ public void CanMergeRepoNonFastForward(bool shouldMergeOccurInDetachedHeadState)
106106 if ( shouldMergeOccurInDetachedHeadState )
107107 {
108108 // Detaches HEAD
109- repo . Checkout ( secondBranch . Tip ) ;
109+ Commands . Checkout ( repo , secondBranch . Tip ) ;
110110 }
111111 else
112112 {
113- repo . Checkout ( secondBranch ) ;
113+ Commands . Checkout ( repo , secondBranch ) ;
114114 }
115115
116116 // Commit with ONE new file to second branch (FirstBranch and SecondBranch now point to separate commits that both have the same parent commit).
@@ -142,14 +142,14 @@ public void IsUpToDateMerge()
142142 using ( var repo = new Repository ( path ) )
143143 {
144144 var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
145- repo . Checkout ( firstBranch ) ;
145+ Commands . Checkout ( repo , firstBranch ) ;
146146
147147 // Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
148148 AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
149149
150150 var secondBranch = repo . CreateBranch ( "SecondBranch" ) ;
151151
152- repo . Checkout ( secondBranch ) ;
152+ Commands . Checkout ( repo , secondBranch ) ;
153153
154154 MergeResult mergeResult = repo . Merge ( repo . Branches [ "FirstBranch" ] . Tip , Constants . Signature ) ;
155155
@@ -175,7 +175,7 @@ public void CanFastForwardRepos(bool shouldMergeOccurInDetachedHeadState)
175175 repo . RemoveUntrackedFiles ( ) ;
176176
177177 var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
178- repo . Checkout ( firstBranch ) ;
178+ Commands . Checkout ( repo , firstBranch ) ;
179179
180180 // Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
181181 AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
@@ -188,11 +188,11 @@ public void CanFastForwardRepos(bool shouldMergeOccurInDetachedHeadState)
188188 if ( shouldMergeOccurInDetachedHeadState )
189189 {
190190 // Detaches HEAD
191- repo . Checkout ( secondBranch . Tip ) ;
191+ Commands . Checkout ( repo , secondBranch . Tip ) ;
192192 }
193193 else
194194 {
195- repo . Checkout ( secondBranch ) ;
195+ Commands . Checkout ( repo , secondBranch ) ;
196196 }
197197
198198 Assert . Equal ( shouldMergeOccurInDetachedHeadState , repo . Info . IsHeadDetached ) ;
@@ -226,7 +226,7 @@ public void ConflictingMergeRepos()
226226 using ( var repo = new Repository ( path ) )
227227 {
228228 var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
229- repo . Checkout ( firstBranch ) ;
229+ Commands . Checkout ( repo , firstBranch ) ;
230230
231231 // Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
232232 AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
@@ -236,7 +236,7 @@ public void ConflictingMergeRepos()
236236 AddFileCommitToRepo ( repo , firstBranchFileName ) ;
237237 AddFileCommitToRepo ( repo , sharedBranchFileName , "The first branches comment" ) ; // Change file in first branch
238238
239- repo . Checkout ( secondBranch ) ;
239+ Commands . Checkout ( repo , secondBranch ) ;
240240 // Commit with ONE new file to second branch (FirstBranch and SecondBranch now point to separate commits that both have the same parent commit).
241241 AddFileCommitToRepo ( repo , secondBranchFileName ) ;
242242 AddFileCommitToRepo ( repo , sharedBranchFileName , "The second branches comment" ) ; // Change file in second branch
@@ -266,7 +266,7 @@ public void ConflictingMergeReposBinary()
266266 using ( var repo = new Repository ( path ) )
267267 {
268268 var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
269- repo . Checkout ( firstBranch ) ;
269+ Commands . Checkout ( repo , firstBranch ) ;
270270
271271 // Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
272272 AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
@@ -276,7 +276,7 @@ public void ConflictingMergeReposBinary()
276276 AddFileCommitToRepo ( repo , firstBranchFileName ) ;
277277 AddFileCommitToRepo ( repo , sharedBranchFileName , "\0 The first branches comment\0 " ) ; // Change file in first branch
278278
279- repo . Checkout ( secondBranch ) ;
279+ Commands . Checkout ( repo , secondBranch ) ;
280280 // Commit with ONE new file to second branch (FirstBranch and SecondBranch now point to separate commits that both have the same parent commit).
281281 AddFileCommitToRepo ( repo , secondBranchFileName ) ;
282282 AddFileCommitToRepo ( repo , sharedBranchFileName , "\0 The second branches comment\0 " ) ; // Change file in second branch
@@ -325,7 +325,7 @@ public void CanFastForwardCommit(bool fromDetachedHead, FastForwardStrategy fast
325325 {
326326 if ( fromDetachedHead )
327327 {
328- repo . Checkout ( repo . Head . Tip . Id . Sha ) ;
328+ Commands . Checkout ( repo , repo . Head . Tip . Id . Sha ) ;
329329 }
330330
331331 Commit commitToMerge = repo . Branches [ "fast_forward" ] . Tip ;
@@ -351,7 +351,7 @@ public void CanNonFastForwardMergeCommit(bool fromDetachedHead, FastForwardStrat
351351 {
352352 if ( fromDetachedHead )
353353 {
354- repo . Checkout ( repo . Head . Tip . Id . Sha ) ;
354+ Commands . Checkout ( repo , repo . Head . Tip . Id . Sha ) ;
355355 }
356356
357357 Commit commitToMerge = repo . Branches [ "normal_merge" ] . Tip ;
@@ -469,7 +469,7 @@ public void MergeCanDetectRenames()
469469 string repoPath = SandboxMergeTestRepo ( ) ;
470470 using ( var repo = new Repository ( repoPath ) )
471471 {
472- Branch currentBranch = repo . Checkout ( "rename_source" ) ;
472+ Branch currentBranch = Commands . Checkout ( repo , "rename_source" ) ;
473473 Assert . NotNull ( currentBranch ) ;
474474
475475 Branch branchToMerge = repo . Branches [ "rename" ] ;
0 commit comments