File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
GitVersionCore.Tests/IntegrationTests Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 11using System ;
2+ using System . Collections . Generic ;
23using GitVersion ;
34using LibGit2Sharp ;
45using NUnit . Framework ;
@@ -32,6 +33,36 @@ public void ShouldInheritIncrementCorrectlyWithMultiplePossibleParentsAndWeirdly
3233 fixture . AssertFullSemver ( "1.1.0-JIRA-124.1+2" ) ;
3334 }
3435 }
36+
37+ [ Test ]
38+ public void BranchCreatedAfterFastForwardMergeShouldInheritCorrectly ( )
39+ {
40+ var config = new Config ( ) ;
41+ config . Branches . Add ( "unstable" , config . Branches [ "develop" ] ) ;
42+
43+ using ( var fixture = new EmptyRepositoryFixture ( config ) )
44+ {
45+ fixture . Repository . MakeATaggedCommit ( "1.0.0" ) ;
46+ fixture . Repository . CreateBranch ( "unstable" ) ;
47+ fixture . Repository . Checkout ( "unstable" ) ;
48+
49+ //Create an initial feature branch
50+ var feature123 = fixture . Repository . CreateBranch ( "feature/JIRA-123" ) ;
51+ fixture . Repository . Checkout ( "feature/JIRA-123" ) ;
52+ fixture . Repository . MakeCommits ( 1 ) ;
53+
54+ //Merge it
55+ fixture . Repository . Checkout ( "unstable" ) ;
56+ fixture . Repository . Merge ( feature123 , new Signature ( "me" , "[email protected] " , DateTimeOffset . Now ) ) ; 57+
58+ //Create a second feature branch
59+ fixture . Repository . CreateBranch ( "feature/JIRA-124" ) ;
60+ fixture . Repository . Checkout ( "feature/JIRA-124" ) ;
61+ fixture . Repository . MakeCommits ( 1 ) ;
62+
63+ fixture . AssertFullSemver ( "1.1.0-JIRA-124.1+2" ) ;
64+ }
65+ }
3566
3667 [ Test ]
3768 public void ShouldNotUseNumberInFeatureBranchAsPreReleaseNumberOffDevelop ( )
You can’t perform that action at this time.
0 commit comments