@@ -94,7 +94,7 @@ public void CanMergeRepoNonFastForward(bool shouldMergeOccurInDetachedHeadState)
94
94
using ( var repo = new Repository ( path ) )
95
95
{
96
96
var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
97
- firstBranch . Checkout ( ) ;
97
+ repo . Checkout ( firstBranch ) ;
98
98
var originalTreeCount = firstBranch . Tip . Tree . Count ;
99
99
100
100
// Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
@@ -111,7 +111,7 @@ public void CanMergeRepoNonFastForward(bool shouldMergeOccurInDetachedHeadState)
111
111
}
112
112
else
113
113
{
114
- secondBranch . Checkout ( ) ;
114
+ repo . Checkout ( secondBranch ) ;
115
115
}
116
116
117
117
// Commit with ONE new file to second branch (FirstBranch and SecondBranch now point to separate commits that both have the same parent commit).
@@ -143,14 +143,14 @@ public void IsUpToDateMerge()
143
143
using ( var repo = new Repository ( path ) )
144
144
{
145
145
var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
146
- firstBranch . Checkout ( ) ;
146
+ repo . Checkout ( firstBranch ) ;
147
147
148
148
// Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
149
149
AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
150
150
151
151
var secondBranch = repo . CreateBranch ( "SecondBranch" ) ;
152
152
153
- secondBranch . Checkout ( ) ;
153
+ repo . Checkout ( secondBranch ) ;
154
154
155
155
MergeResult mergeResult = repo . Merge ( repo . Branches [ "FirstBranch" ] . Tip , Constants . Signature ) ;
156
156
@@ -176,7 +176,7 @@ public void CanFastForwardRepos(bool shouldMergeOccurInDetachedHeadState)
176
176
repo . RemoveUntrackedFiles ( ) ;
177
177
178
178
var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
179
- firstBranch . Checkout ( ) ;
179
+ repo . Checkout ( firstBranch ) ;
180
180
181
181
// Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
182
182
AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
@@ -193,7 +193,7 @@ public void CanFastForwardRepos(bool shouldMergeOccurInDetachedHeadState)
193
193
}
194
194
else
195
195
{
196
- secondBranch . Checkout ( ) ;
196
+ repo . Checkout ( secondBranch ) ;
197
197
}
198
198
199
199
Assert . Equal ( shouldMergeOccurInDetachedHeadState , repo . Info . IsHeadDetached ) ;
@@ -227,7 +227,7 @@ public void ConflictingMergeRepos()
227
227
using ( var repo = new Repository ( path ) )
228
228
{
229
229
var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
230
- firstBranch . Checkout ( ) ;
230
+ repo . Checkout ( firstBranch ) ;
231
231
232
232
// Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
233
233
AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
@@ -237,7 +237,7 @@ public void ConflictingMergeRepos()
237
237
AddFileCommitToRepo ( repo , firstBranchFileName ) ;
238
238
AddFileCommitToRepo ( repo , sharedBranchFileName , "The first branches comment" ) ; // Change file in first branch
239
239
240
- secondBranch . Checkout ( ) ;
240
+ repo . Checkout ( secondBranch ) ;
241
241
// Commit with ONE new file to second branch (FirstBranch and SecondBranch now point to separate commits that both have the same parent commit).
242
242
AddFileCommitToRepo ( repo , secondBranchFileName ) ;
243
243
AddFileCommitToRepo ( repo , sharedBranchFileName , "The second branches comment" ) ; // Change file in second branch
@@ -267,7 +267,7 @@ public void ConflictingMergeReposBinary()
267
267
using ( var repo = new Repository ( path ) )
268
268
{
269
269
var firstBranch = repo . CreateBranch ( "FirstBranch" ) ;
270
- firstBranch . Checkout ( ) ;
270
+ repo . Checkout ( firstBranch ) ;
271
271
272
272
// Commit with ONE new file to both first & second branch (SecondBranch is created on this commit).
273
273
AddFileCommitToRepo ( repo , sharedBranchFileName ) ;
@@ -277,7 +277,7 @@ public void ConflictingMergeReposBinary()
277
277
AddFileCommitToRepo ( repo , firstBranchFileName ) ;
278
278
AddFileCommitToRepo ( repo , sharedBranchFileName , "\0 The first branches comment\0 " ) ; // Change file in first branch
279
279
280
- secondBranch . Checkout ( ) ;
280
+ repo . Checkout ( secondBranch ) ;
281
281
// Commit with ONE new file to second branch (FirstBranch and SecondBranch now point to separate commits that both have the same parent commit).
282
282
AddFileCommitToRepo ( repo , secondBranchFileName ) ;
283
283
AddFileCommitToRepo ( repo , sharedBranchFileName , "\0 The second branches comment\0 " ) ; // Change file in second branch
0 commit comments