@@ -93,7 +93,7 @@ public void CanMergeRepoNonFastForward(bool shouldMergeOccurInDetachedHeadState)
93
93
using ( var repo = new Repository ( path ) )
94
94
{
95
95
var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
96
- repo . Checkout ( firstBranch ) ;
96
+ Commands . Checkout ( repo , firstBranch ) ;
97
97
var originalTreeCount = firstBranch . Tip . Tree . Count ;
98
98
99
99
// 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)
106
106
if ( shouldMergeOccurInDetachedHeadState )
107
107
{
108
108
// Detaches HEAD
109
- repo . Checkout ( secondBranch . Tip ) ;
109
+ Commands . Checkout ( repo , secondBranch . Tip ) ;
110
110
}
111
111
else
112
112
{
113
- repo . Checkout ( secondBranch ) ;
113
+ Commands . Checkout ( repo , secondBranch ) ;
114
114
}
115
115
116
116
// 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()
142
142
using ( var repo = new Repository ( path ) )
143
143
{
144
144
var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
145
- repo . Checkout ( firstBranch ) ;
145
+ Commands . Checkout ( repo , firstBranch ) ;
146
146
147
147
// Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
148
148
AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
149
149
150
150
var secondBranch = repo . CreateBranch ( "SecondBranch" ) ;
151
151
152
- repo . Checkout ( secondBranch ) ;
152
+ Commands . Checkout ( repo , secondBranch ) ;
153
153
154
154
MergeResult mergeResult = repo . Merge ( repo . Branches [ "FirstBranch" ] . Tip , Constants . Signature ) ;
155
155
@@ -175,7 +175,7 @@ public void CanFastForwardRepos(bool shouldMergeOccurInDetachedHeadState)
175
175
repo . RemoveUntrackedFiles ( ) ;
176
176
177
177
var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
178
- repo . Checkout ( firstBranch ) ;
178
+ Commands . Checkout ( repo , firstBranch ) ;
179
179
180
180
// Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
181
181
AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
@@ -188,11 +188,11 @@ public void CanFastForwardRepos(bool shouldMergeOccurInDetachedHeadState)
188
188
if ( shouldMergeOccurInDetachedHeadState )
189
189
{
190
190
// Detaches HEAD
191
- repo . Checkout ( secondBranch . Tip ) ;
191
+ Commands . Checkout ( repo , secondBranch . Tip ) ;
192
192
}
193
193
else
194
194
{
195
- repo . Checkout ( secondBranch ) ;
195
+ Commands . Checkout ( repo , secondBranch ) ;
196
196
}
197
197
198
198
Assert . Equal ( shouldMergeOccurInDetachedHeadState , repo . Info . IsHeadDetached ) ;
@@ -226,7 +226,7 @@ public void ConflictingMergeRepos()
226
226
using ( var repo = new Repository ( path ) )
227
227
{
228
228
var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
229
- repo . Checkout ( firstBranch ) ;
229
+ Commands . Checkout ( repo , firstBranch ) ;
230
230
231
231
// Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
232
232
AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
@@ -236,7 +236,7 @@ public void ConflictingMergeRepos()
236
236
AddFileCommitToRepo ( repo , firstBranchFileName ) ;
237
237
AddFileCommitToRepo ( repo , sharedBranchFileName , "The first branches comment" ) ; // Change file in first branch
238
238
239
- repo . Checkout ( secondBranch ) ;
239
+ Commands . Checkout ( repo , secondBranch ) ;
240
240
// Commit with ONE new file to second branch (FirstBranch and SecondBranch now point to separate commits that both have the same parent commit).
241
241
AddFileCommitToRepo ( repo , secondBranchFileName ) ;
242
242
AddFileCommitToRepo ( repo , sharedBranchFileName , "The second branches comment" ) ; // Change file in second branch
@@ -266,7 +266,7 @@ public void ConflictingMergeReposBinary()
266
266
using ( var repo = new Repository ( path ) )
267
267
{
268
268
var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
269
- repo . Checkout ( firstBranch ) ;
269
+ Commands . Checkout ( repo , firstBranch ) ;
270
270
271
271
// Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
272
272
AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
@@ -276,7 +276,7 @@ public void ConflictingMergeReposBinary()
276
276
AddFileCommitToRepo ( repo , firstBranchFileName ) ;
277
277
AddFileCommitToRepo ( repo , sharedBranchFileName , "\0 The first branches comment\0 " ) ; // Change file in first branch
278
278
279
- repo . Checkout ( secondBranch ) ;
279
+ Commands . Checkout ( repo , secondBranch ) ;
280
280
// Commit with ONE new file to second branch (FirstBranch and SecondBranch now point to separate commits that both have the same parent commit).
281
281
AddFileCommitToRepo ( repo , secondBranchFileName ) ;
282
282
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
325
325
{
326
326
if ( fromDetachedHead )
327
327
{
328
- repo . Checkout ( repo . Head . Tip . Id . Sha ) ;
328
+ Commands . Checkout ( repo , repo . Head . Tip . Id . Sha ) ;
329
329
}
330
330
331
331
Commit commitToMerge = repo . Branches [ "fast_forward" ] . Tip ;
@@ -351,7 +351,7 @@ public void CanNonFastForwardMergeCommit(bool fromDetachedHead, FastForwardStrat
351
351
{
352
352
if ( fromDetachedHead )
353
353
{
354
- repo . Checkout ( repo . Head . Tip . Id . Sha ) ;
354
+ Commands . Checkout ( repo , repo . Head . Tip . Id . Sha ) ;
355
355
}
356
356
357
357
Commit commitToMerge = repo . Branches [ "normal_merge" ] . Tip ;
@@ -469,7 +469,7 @@ public void MergeCanDetectRenames()
469
469
string repoPath = SandboxMergeTestRepo ( ) ;
470
470
using ( var repo = new Repository ( repoPath ) )
471
471
{
472
- Branch currentBranch = repo . Checkout ( "rename_source" ) ;
472
+ Branch currentBranch = Commands . Checkout ( repo , "rename_source" ) ;
473
473
Assert . NotNull ( currentBranch ) ;
474
474
475
475
Branch branchToMerge = repo . Branches [ "rename" ] ;
0 commit comments