@@ -156,7 +156,7 @@ public void CheckoutAddsMissingFilesInWorkingDirectory()
156156 // Remove the file in master branch
157157 // Verify it exists after checking out otherBranch.
158158 string fileFullPath = Path . Combine ( repo . Info . WorkingDirectory , originalFilePath ) ;
159- repo . Remove ( fileFullPath ) ;
159+ Commands . Remove ( repo , fileFullPath ) ;
160160 repo . Commit ( "2nd commit" , Constants . Signature , Constants . Signature ) ;
161161
162162 // Checkout other_branch
@@ -184,7 +184,7 @@ public void CheckoutRemovesExtraFilesInWorkingDirectory()
184184 string newFileFullPath = Touch (
185185 repo . Info . WorkingDirectory , "b.txt" , "hello from master branch!\n " ) ;
186186
187- repo . Stage ( newFileFullPath ) ;
187+ Commands . Stage ( repo , newFileFullPath ) ;
188188 repo . Commit ( "2nd commit" , Constants . Signature , Constants . Signature ) ;
189189
190190 // Checkout other_branch
@@ -212,7 +212,7 @@ public void CheckoutUpdatesModifiedFilesInWorkingDirectory()
212212 string fullPath = Touch (
213213 repo . Info . WorkingDirectory , originalFilePath , "Update : hello from master branch!\n " ) ;
214214
215- repo . Stage ( fullPath ) ;
215+ Commands . Stage ( repo , fullPath ) ;
216216 repo . Commit ( "2nd commit" , Constants . Signature , Constants . Signature ) ;
217217
218218 // Checkout other_branch
@@ -254,15 +254,15 @@ public void CanForcefullyCheckoutWithConflictingStagedChanges()
254254 // Add change to master.
255255 Touch ( repo . Info . WorkingDirectory , originalFilePath , originalFileContent ) ;
256256
257- repo . Stage ( originalFilePath ) ;
257+ Commands . Stage ( repo , originalFilePath ) ;
258258 repo . Commit ( "change in master" , Constants . Signature , Constants . Signature ) ;
259259
260260 // Checkout otherBranch.
261261 repo . Checkout ( otherBranchName ) ;
262262
263263 // Add change to otherBranch.
264264 Touch ( repo . Info . WorkingDirectory , originalFilePath , alternateFileContent ) ;
265- repo . Stage ( originalFilePath ) ;
265+ Commands . Stage ( repo , originalFilePath ) ;
266266
267267 // Assert that normal checkout throws exception
268268 // for the conflict.
@@ -287,15 +287,15 @@ public void CheckingOutWithMergeConflictsThrows()
287287 using ( var repo = new Repository ( repoPath ) )
288288 {
289289 Touch ( repo . Info . WorkingDirectory , originalFilePath , "Hello\n " ) ;
290- repo . Stage ( originalFilePath ) ;
290+ Commands . Stage ( repo , originalFilePath ) ;
291291 repo . Commit ( "Initial commit" , Constants . Signature , Constants . Signature ) ;
292292
293293 // Create 2nd branch
294294 repo . CreateBranch ( "branch2" ) ;
295295
296296 // Update file in main
297297 Touch ( repo . Info . WorkingDirectory , originalFilePath , "Hello from master!\n " ) ;
298- repo . Stage ( originalFilePath ) ;
298+ Commands . Stage ( repo , originalFilePath ) ;
299299 repo . Commit ( "2nd commit" , Constants . Signature , Constants . Signature ) ;
300300
301301 // Checkout branch2
@@ -307,7 +307,7 @@ public void CheckingOutWithMergeConflictsThrows()
307307 Assert . Throws < CheckoutConflictException > ( ( ) => repo . Checkout ( "master" ) ) ;
308308
309309 // And when there are staged commits
310- repo . Stage ( originalFilePath ) ;
310+ Commands . Stage ( repo , originalFilePath ) ;
311311 Assert . Throws < CheckoutConflictException > ( ( ) => repo . Checkout ( "master" ) ) ;
312312 }
313313 }
@@ -322,15 +322,15 @@ public void CanCancelCheckoutThroughNotifyCallback()
322322 const string relativePath = "a.txt" ;
323323 Touch ( repo . Info . WorkingDirectory , relativePath , "Hello\n " ) ;
324324
325- repo . Stage ( relativePath ) ;
325+ Commands . Stage ( repo , relativePath ) ;
326326 repo . Commit ( "Initial commit" , Constants . Signature , Constants . Signature ) ;
327327
328328 // Create 2nd branch
329329 repo . CreateBranch ( "branch2" ) ;
330330
331331 // Update file in main
332332 Touch ( repo . Info . WorkingDirectory , relativePath , "Hello from master!\n " ) ;
333- repo . Stage ( relativePath ) ;
333+ Commands . Stage ( repo , relativePath ) ;
334334 repo . Commit ( "2nd commit" , Constants . Signature , Constants . Signature ) ;
335335
336336 // Checkout branch2
@@ -453,23 +453,23 @@ public void CheckingOutCallsCheckoutNotify(CheckoutNotifyFlags notifyFlags, stri
453453
454454 const string relativePathUpdated = "updated.txt" ;
455455 Touch ( repo . Info . WorkingDirectory , relativePathUpdated , "updated file text A" ) ;
456- repo . Stage ( relativePathUpdated ) ;
456+ Commands . Stage ( repo , relativePathUpdated ) ;
457457 repo . Commit ( "Commit initial update file" , Constants . Signature , Constants . Signature ) ;
458458
459459 // Create conflicting change
460460 const string relativePathConflict = "conflict.txt" ;
461461 Touch ( repo . Info . WorkingDirectory , relativePathConflict , "conflict file text A" ) ;
462- repo . Stage ( relativePathConflict ) ;
462+ Commands . Stage ( repo , relativePathConflict ) ;
463463 repo . Commit ( "Initial commit of conflict.txt and update.txt" , Constants . Signature , Constants . Signature ) ;
464464
465465 // Create another branch
466466 repo . CreateBranch ( "newbranch" ) ;
467467
468468 // Make an edit to conflict.txt and update.txt
469469 Touch ( repo . Info . WorkingDirectory , relativePathUpdated , "updated file text BB" ) ;
470- repo . Stage ( relativePathUpdated ) ;
470+ Commands . Stage ( repo , relativePathUpdated ) ;
471471 Touch ( repo . Info . WorkingDirectory , relativePathConflict , "conflict file text BB" ) ;
472- repo . Stage ( relativePathConflict ) ;
472+ Commands . Stage ( repo , relativePathConflict ) ;
473473
474474 repo . Commit ( "2nd commit of conflict.txt and update.txt on master branch" , Constants . Signature , Constants . Signature ) ;
475475
@@ -478,14 +478,14 @@ public void CheckingOutCallsCheckoutNotify(CheckoutNotifyFlags notifyFlags, stri
478478
479479 // Make alternate edits to conflict.txt and update.txt
480480 Touch ( repo . Info . WorkingDirectory , relativePathUpdated , "updated file text CCC" ) ;
481- repo . Stage ( relativePathUpdated ) ;
481+ Commands . Stage ( repo , relativePathUpdated ) ;
482482 Touch ( repo . Info . WorkingDirectory , relativePathConflict , "conflict file text CCC" ) ;
483- repo . Stage ( relativePathConflict ) ;
483+ Commands . Stage ( repo , relativePathConflict ) ;
484484 repo . Commit ( "2nd commit of conflict.txt and update.txt on newbranch" , Constants . Signature , Constants . Signature ) ;
485485
486486 // make conflicting change to conflict.txt
487487 Touch ( repo . Info . WorkingDirectory , relativePathConflict , "conflict file text DDDD" ) ;
488- repo . Stage ( relativePathConflict ) ;
488+ Commands . Stage ( repo , relativePathConflict ) ;
489489
490490 // Create ignored change
491491 string relativePathIgnore = Path . Combine ( "bin" , "ignored.txt" ) ;
@@ -596,7 +596,7 @@ public void CheckoutRetainsStagedChanges()
596596
597597 // Generate a staged change.
598598 string fullPathFileA = Touch ( repo . Info . WorkingDirectory , originalFilePath , alternateFileContent ) ;
599- repo . Stage ( fullPathFileA ) ;
599+ Commands . Stage ( repo , fullPathFileA ) ;
600600
601601 // Verify that there is a staged entry.
602602 Assert . Equal ( 1 , repo . RetrieveStatus ( ) . Staged . Count ( ) ) ;
@@ -680,7 +680,7 @@ public void CheckoutBranchSnapshot()
680680
681681 // Add commit to master
682682 string fullPath = Touch ( repo . Info . WorkingDirectory , originalFilePath , "Update : hello from master branch!\n " ) ;
683- repo . Stage ( fullPath ) ;
683+ Commands . Stage ( repo , fullPath ) ;
684684 repo . Commit ( "2nd commit" , Constants . Signature , Constants . Signature ) ;
685685
686686 Assert . False ( repo . Info . IsHeadDetached ) ;
@@ -1038,10 +1038,10 @@ private void PopulateBasicRepository(IRepository repo)
10381038 {
10391039 // Generate a .gitignore file.
10401040 string gitIgnoreFilePath = Touch ( repo . Info . WorkingDirectory , ".gitignore" , "bin" ) ;
1041- repo . Stage ( gitIgnoreFilePath ) ;
1041+ Commands . Stage ( repo , gitIgnoreFilePath ) ;
10421042
10431043 string fullPathFileA = Touch ( repo . Info . WorkingDirectory , originalFilePath , originalFileContent ) ;
1044- repo . Stage ( fullPathFileA ) ;
1044+ Commands . Stage ( repo , fullPathFileA ) ;
10451045
10461046 repo . Commit ( "Initial commit" , Constants . Signature , Constants . Signature ) ;
10471047
0 commit comments