@@ -78,7 +78,7 @@ public void CanRebase(string initialBranchName,
78
78
} ,
79
79
} ;
80
80
81
- RebaseResult rebaseResult = repo . Rebase . Start ( branch , upstream , onto , Constants . Identity , options ) ;
81
+ RebaseResult rebaseResult = Commands . Rebase . Start ( repo , branch , upstream , onto , Constants . Identity , options ) ;
82
82
83
83
// Validation:
84
84
Assert . True ( afterRebaseStepCountCorrect , "Unexpected CompletedStepIndex value in RebaseStepCompleted" ) ;
@@ -130,7 +130,7 @@ public void CanRebaseBranchOntoItself()
130
130
Commands . Checkout ( repo , topicBranch2Name ) ;
131
131
Branch b = repo . Branches [ topicBranch2Name ] ;
132
132
133
- RebaseResult result = repo . Rebase . Start ( b , b , null , Constants . Identity , new RebaseOptions ( ) ) ;
133
+ RebaseResult result = Commands . Rebase . Start ( repo , b , b , null , Constants . Identity , new RebaseOptions ( ) ) ;
134
134
Assert . Equal ( 0 , result . TotalStepCount ) ;
135
135
Assert . Equal ( RebaseStatus . Complete , result . Status ) ;
136
136
Assert . Equal ( 0 , result . CompletedStepCount ) ;
@@ -251,7 +251,7 @@ public void VerifyRebaseDetailed(string attributes, string lineEnding, string[]
251
251
252
252
} ;
253
253
254
- repo . Rebase . Start ( null , upstreamBranch , null , Constants . Identity2 , options ) ;
254
+ Commands . Rebase . Start ( repo , null , upstreamBranch , null , Constants . Identity2 , options ) ;
255
255
256
256
Assert . Equal ( true , wasCheckoutNotifyCalledForResetingHead ) ;
257
257
Assert . Equal ( true , wasCheckoutProgressCalledForResetingHead ) ;
@@ -317,7 +317,7 @@ public void CanContinueRebase()
317
317
CheckoutNotifyFlags = CheckoutNotifyFlags . Updated ,
318
318
} ;
319
319
320
- RebaseResult rebaseResult = repo . Rebase . Start ( branch , upstream , onto , Constants . Identity , options ) ;
320
+ RebaseResult rebaseResult = Commands . Rebase . Start ( repo , branch , upstream , onto , Constants . Identity , options ) ;
321
321
322
322
// Verify that we have a conflict.
323
323
Assert . Equal ( CurrentOperation . RebaseMerge , repo . Info . CurrentOperation ) ;
@@ -345,7 +345,7 @@ public void CanContinueRebase()
345
345
346
346
// Clear the flags:
347
347
wasCheckoutProgressCalled = false ; wasCheckoutNotifyCalled = false ;
348
- RebaseResult continuedRebaseResult = repo . Rebase . Continue ( Constants . Identity , options ) ;
348
+ RebaseResult continuedRebaseResult = Commands . Rebase . Continue ( repo , Constants . Identity , options ) ;
349
349
350
350
Assert . NotNull ( continuedRebaseResult ) ;
351
351
Assert . Equal ( RebaseStatus . Complete , continuedRebaseResult . Status ) ;
@@ -377,7 +377,7 @@ public void ContinuingRebaseWithUnstagedChangesThrows()
377
377
Branch upstream = repo . Branches [ conflictBranch1Name ] ;
378
378
Branch onto = repo . Branches [ conflictBranch1Name ] ;
379
379
380
- RebaseResult rebaseResult = repo . Rebase . Start ( branch , upstream , onto , Constants . Identity , null ) ;
380
+ RebaseResult rebaseResult = Commands . Rebase . Start ( repo , branch , upstream , onto , Constants . Identity , null ) ;
381
381
382
382
// Verify that we have a conflict.
383
383
Assert . Equal ( CurrentOperation . RebaseMerge , repo . Info . CurrentOperation ) ;
@@ -388,7 +388,7 @@ public void ContinuingRebaseWithUnstagedChangesThrows()
388
388
Assert . Equal ( 3 , rebaseResult . TotalStepCount ) ;
389
389
390
390
Assert . Throws < UnmergedIndexEntriesException > ( ( ) =>
391
- repo . Rebase . Continue ( Constants . Identity , null ) ) ;
391
+ Commands . Rebase . Continue ( repo , Constants . Identity , null ) ) ;
392
392
393
393
// Resolve the conflict
394
394
foreach ( Conflict conflict in repo . Index . Conflicts )
@@ -404,7 +404,7 @@ public void ContinuingRebaseWithUnstagedChangesThrows()
404
404
"Unstaged content" ) ;
405
405
406
406
Assert . Throws < UnmergedIndexEntriesException > ( ( ) =>
407
- repo . Rebase . Continue ( Constants . Identity , null ) ) ;
407
+ Commands . Rebase . Continue ( repo , Constants . Identity , null ) ) ;
408
408
409
409
Assert . True ( repo . Index . IsFullyMerged ) ;
410
410
}
@@ -431,7 +431,7 @@ public void CanSpecifyFileConflictStrategy()
431
431
FileConflictStrategy = CheckoutFileConflictStrategy . Ours ,
432
432
} ;
433
433
434
- RebaseResult rebaseResult = repo . Rebase . Start ( branch , upstream , onto , Constants . Identity , options ) ;
434
+ RebaseResult rebaseResult = Commands . Rebase . Start ( repo , branch , upstream , onto , Constants . Identity , options ) ;
435
435
436
436
// Verify that we have a conflict.
437
437
Assert . Equal ( CurrentOperation . RebaseMerge , repo . Info . CurrentOperation ) ;
@@ -473,7 +473,7 @@ public void CanQueryRebaseOperation()
473
473
Branch upstream = repo . Branches [ conflictBranch1Name ] ;
474
474
Branch onto = repo . Branches [ conflictBranch1Name ] ;
475
475
476
- RebaseResult rebaseResult = repo . Rebase . Start ( branch , upstream , onto , Constants . Identity , null ) ;
476
+ RebaseResult rebaseResult = Commands . Rebase . Start ( repo , branch , upstream , onto , Constants . Identity , null ) ;
477
477
478
478
// Verify that we have a conflict.
479
479
Assert . Equal ( RebaseStatus . Conflicts , rebaseResult . Status ) ;
@@ -482,10 +482,10 @@ public void CanQueryRebaseOperation()
482
482
Assert . Equal ( 0 , rebaseResult . CompletedStepCount ) ;
483
483
Assert . Equal ( 3 , rebaseResult . TotalStepCount ) ;
484
484
485
- RebaseStepInfo info = repo . Rebase . GetCurrentStepInfo ( ) ;
485
+ RebaseStepInfo info = Commands . Rebase . GetCurrentStepInfo ( repo ) ;
486
486
487
- Assert . Equal ( 0 , repo . Rebase . GetCurrentStepIndex ( ) ) ;
488
- Assert . Equal ( 3 , repo . Rebase . GetTotalStepCount ( ) ) ;
487
+ Assert . Equal ( 0 , Commands . Rebase . GetCurrentStepIndex ( repo ) ) ;
488
+ Assert . Equal ( 3 , Commands . Rebase . GetTotalStepCount ( repo ) ) ;
489
489
Assert . Equal ( RebaseStepOperation . Pick , info . Type ) ;
490
490
}
491
491
}
@@ -506,7 +506,7 @@ public void CanAbortRebase()
506
506
Branch upstream = repo . Branches [ conflictBranch1Name ] ;
507
507
Branch onto = repo . Branches [ conflictBranch1Name ] ;
508
508
509
- RebaseResult rebaseResult = repo . Rebase . Start ( branch , upstream , onto , Constants . Identity , null ) ;
509
+ RebaseResult rebaseResult = Commands . Rebase . Start ( repo , branch , upstream , onto , Constants . Identity , null ) ;
510
510
511
511
// Verify that we have a conflict.
512
512
Assert . Equal ( RebaseStatus . Conflicts , rebaseResult . Status ) ;
@@ -526,7 +526,7 @@ public void CanAbortRebase()
526
526
CheckoutNotifyFlags = CheckoutNotifyFlags . Updated ,
527
527
} ;
528
528
529
- repo . Rebase . Abort ( options ) ;
529
+ Commands . Rebase . Abort ( repo , options ) ;
530
530
Assert . False ( repo . RetrieveStatus ( ) . IsDirty , "Repository workdir is dirty after Rebase.Abort." ) ;
531
531
Assert . True ( repo . Index . IsFullyMerged , "Repository index is not fully merged after Rebase.Abort." ) ;
532
532
Assert . Equal ( CurrentOperation . None , repo . Info . CurrentOperation ) ;
@@ -552,15 +552,15 @@ public void RebaseWhileAlreadyRebasingThrows()
552
552
Branch upstream = repo . Branches [ conflictBranch1Name ] ;
553
553
Branch onto = repo . Branches [ conflictBranch1Name ] ;
554
554
555
- RebaseResult rebaseResult = repo . Rebase . Start ( branch , upstream , onto , Constants . Identity , null ) ;
555
+ RebaseResult rebaseResult = Commands . Rebase . Start ( repo , branch , upstream , onto , Constants . Identity , null ) ;
556
556
557
557
// Verify that we have a conflict.
558
558
Assert . Equal ( RebaseStatus . Conflicts , rebaseResult . Status ) ;
559
559
Assert . True ( repo . RetrieveStatus ( ) . IsDirty ) ;
560
560
Assert . Equal ( CurrentOperation . RebaseMerge , repo . Info . CurrentOperation ) ;
561
561
562
562
Assert . Throws < LibGit2SharpException > ( ( ) =>
563
- repo . Rebase . Start ( branch , upstream , onto , Constants . Identity , null ) ) ;
563
+ Commands . Rebase . Start ( repo , branch , upstream , onto , Constants . Identity , null ) ) ;
564
564
}
565
565
}
566
566
@@ -576,10 +576,10 @@ public void RebaseOperationsWithoutRebasingThrow()
576
576
Commands . Checkout ( repo , topicBranch1Name ) ;
577
577
578
578
Assert . Throws < NotFoundException > ( ( ) =>
579
- repo . Rebase . Continue ( Constants . Identity , new RebaseOptions ( ) ) ) ;
579
+ Commands . Rebase . Continue ( repo , Constants . Identity , new RebaseOptions ( ) ) ) ;
580
580
581
581
Assert . Throws < NotFoundException > ( ( ) =>
582
- repo . Rebase . Abort ( ) ) ;
582
+ Commands . Rebase . Abort ( repo ) ) ;
583
583
}
584
584
}
585
585
@@ -593,7 +593,7 @@ public void CurrentStepInfoIsNullWhenNotRebasing()
593
593
ConstructRebaseTestRepository ( repo ) ;
594
594
Commands . Checkout ( repo , topicBranch1Name ) ;
595
595
596
- Assert . Null ( repo . Rebase . GetCurrentStepInfo ( ) ) ;
596
+ Assert . Null ( Commands . Rebase . GetCurrentStepInfo ( repo ) ) ;
597
597
}
598
598
}
599
599
@@ -642,7 +642,7 @@ public void CanRebaseHandlePatchAlreadyApplied(string attributes, string lineEnd
642
642
}
643
643
} ;
644
644
645
- repo . Rebase . Start ( null , upstreamBranch , null , Constants . Identity2 , options ) ;
645
+ Commands . Rebase . Start ( repo , null , upstreamBranch , null , Constants . Identity2 , options ) ;
646
646
ObjectId secondCommitExpectedTreeId = new ObjectId ( expectedShaText ) ;
647
647
Signature secondCommitAuthorSignature = Constants . Signature ;
648
648
Identity secondCommitCommiterIdentity = Constants . Identity2 ;
@@ -670,9 +670,9 @@ public void RebasingInBareRepositoryThrows()
670
670
Branch rebaseUpstreamBranch = repo . Branches [ "refs/heads/test" ] ;
671
671
672
672
Assert . NotNull ( rebaseUpstreamBranch ) ;
673
- Assert . Throws < BareRepositoryException > ( ( ) => repo . Rebase . Start ( null , rebaseUpstreamBranch , null , Constants . Identity , new RebaseOptions ( ) ) ) ;
674
- Assert . Throws < BareRepositoryException > ( ( ) => repo . Rebase . Continue ( Constants . Identity , new RebaseOptions ( ) ) ) ;
675
- Assert . Throws < BareRepositoryException > ( ( ) => repo . Rebase . Abort ( ) ) ;
673
+ Assert . Throws < BareRepositoryException > ( ( ) => Commands . Rebase . Start ( repo , null , rebaseUpstreamBranch , null , Constants . Identity , new RebaseOptions ( ) ) ) ;
674
+ Assert . Throws < BareRepositoryException > ( ( ) => Commands . Rebase . Continue ( repo , Constants . Identity , new RebaseOptions ( ) ) ) ;
675
+ Assert . Throws < BareRepositoryException > ( ( ) => Commands . Rebase . Abort ( repo ) ) ;
676
676
}
677
677
}
678
678
0 commit comments