1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . IO ;
1
+ using System . Collections . Generic ;
4
2
using System . Linq ;
5
- using System . Text ;
6
- using LibGit2Sharp . Core ;
7
3
using LibGit2Sharp . Tests . TestHelpers ;
8
4
using Xunit ;
9
5
using Xunit . Extensions ;
@@ -56,7 +52,7 @@ public void CanRebase(string initialBranchName,
56
52
57
53
RebaseOptions options = new RebaseOptions ( )
58
54
{
59
- RebaseStepStarting = x =>
55
+ RebaseStepStarting = x =>
60
56
{
61
57
beforeStepCallCount ++ ;
62
58
PreRebaseCommits . Add ( x . StepInfo . Commit ) ;
@@ -346,7 +342,7 @@ public void CanAbortRebase()
346
342
Assert . Equal ( 0 , rebaseResult . CompletedStepCount ) ;
347
343
Assert . Equal ( 3 , rebaseResult . TotalStepCount ) ;
348
344
349
- repo . Rebase . Abort ( Constants . Signature ) ;
345
+ repo . Rebase . Abort ( ) ;
350
346
Assert . False ( repo . RetrieveStatus ( ) . IsDirty ) ;
351
347
Assert . True ( repo . Index . IsFullyMerged ) ;
352
348
Assert . Equal ( CurrentOperation . None , repo . Info . CurrentOperation ) ;
@@ -396,7 +392,7 @@ public void RebaseOperationsWithoutRebasingThrow()
396
392
repo . Rebase . Continue ( Constants . Signature , new RebaseOptions ( ) ) ) ;
397
393
398
394
Assert . Throws < NotFoundException > ( ( ) =>
399
- repo . Rebase . Abort ( Constants . Signature ) ) ;
395
+ repo . Rebase . Abort ( ) ) ;
400
396
}
401
397
}
402
398
@@ -447,7 +443,7 @@ public void CanRebaseHandlePatchAlreadyApplied()
447
443
448
444
RebaseOptions options = new RebaseOptions ( )
449
445
{
450
- RebaseStepCompleted = x =>
446
+ RebaseStepCompleted = x =>
451
447
{
452
448
rebaseResults . Add ( new CompletedRebaseStepInfo ( x . Commit , x . WasPatchAlreadyApplied ) ) ;
453
449
}
@@ -519,7 +515,7 @@ private void ConstructRebaseTestRepository(Repository repo)
519
515
repo . Stage ( filePathC ) ;
520
516
commit = repo . Commit ( "commit 3" , Constants . Signature , Constants . Signature , new CommitOptions ( ) ) ;
521
517
522
- Branch masterBranch1 = repo . CreateBranch ( masterBranch1Name , commit , Constants . Signature ) ;
518
+ Branch masterBranch1 = repo . CreateBranch ( masterBranch1Name , commit ) ;
523
519
524
520
Touch ( workdir , filePathB , string . Join ( lineEnding , fileContentB1 , fileContentB2 ) ) ;
525
521
repo . Stage ( filePathB ) ;
@@ -533,7 +529,7 @@ private void ConstructRebaseTestRepository(Repository repo)
533
529
repo . Stage ( filePathB ) ;
534
530
commit = repo . Commit ( "commit 6" , Constants . Signature , Constants . Signature , new CommitOptions ( ) ) ;
535
531
536
- repo . CreateBranch ( topicBranch1Name , commit , Constants . Signature ) ;
532
+ repo . CreateBranch ( topicBranch1Name , commit ) ;
537
533
538
534
Touch ( workdir , filePathC , string . Join ( lineEnding , fileContentC1 , fileContentC2 ) ) ;
539
535
repo . Stage ( filePathC ) ;
@@ -547,7 +543,7 @@ private void ConstructRebaseTestRepository(Repository repo)
547
543
repo . Stage ( filePathC ) ;
548
544
commit = repo . Commit ( "commit 9" , Constants . Signature , Constants . Signature , new CommitOptions ( ) ) ;
549
545
550
- repo . CreateBranch ( topicBranch2Name , commit , Constants . Signature ) ;
546
+ repo . CreateBranch ( topicBranch2Name , commit ) ;
551
547
552
548
repo . Checkout ( masterBranch1 . Tip ) ;
553
549
Touch ( workdir , filePathD , fileContentD1 ) ;
@@ -562,13 +558,13 @@ private void ConstructRebaseTestRepository(Repository repo)
562
558
repo . Stage ( filePathD ) ;
563
559
commit = repo . Commit ( "commit 12" , Constants . Signature , Constants . Signature , new CommitOptions ( ) ) ;
564
560
565
- repo . CreateBranch ( masterBranch2Name , commit , Constants . Signature ) ;
561
+ repo . CreateBranch ( masterBranch2Name , commit ) ;
566
562
567
563
// Create commit / branch that conflicts with T1 and T2
568
564
Touch ( workdir , filePathB , string . Join ( lineEnding , fileContentB1 , fileContentB2 + fileContentB3 + fileContentB4 ) ) ;
569
565
repo . Stage ( filePathB ) ;
570
566
commit = repo . Commit ( "commit 13" , Constants . Signature , Constants . Signature , new CommitOptions ( ) ) ;
571
- repo . CreateBranch ( conflictBranch1Name , commit , Constants . Signature ) ;
567
+ repo . CreateBranch ( conflictBranch1Name , commit ) ;
572
568
}
573
569
}
574
570
}
0 commit comments