Skip to content

Commit e10e223

Browse files
committed
Merge pull request #859 from libgit2/jamill/branch_create_failure
Failure to create branch
2 parents 431e9c6 + 3e7ae31 commit e10e223

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

LibGit2Sharp.Tests/BranchFixture.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,24 @@ public void CanRemoveAnExistingBranch(string branchName)
919919
}
920920
}
921921

922+
[Fact]
923+
public void CanCreateBranchInDeletedNestedBranchNamespace()
924+
{
925+
const string namespaceName = "level_one";
926+
string branchWithNamespaceName = string.Join("/", namespaceName, "level_two");
927+
928+
string path = SandboxStandardTestRepo();
929+
using (var repo = new Repository(path))
930+
{
931+
Commit commit = repo.Head.Tip;
932+
933+
Branch branchWithNamespace = repo.Branches.Add(branchWithNamespaceName, commit);
934+
repo.Branches.Remove(branchWithNamespace);
935+
936+
repo.Branches.Add(namespaceName, commit);
937+
}
938+
}
939+
922940
[Theory]
923941
[InlineData("I-donot-exist", false)]
924942
[InlineData("me/neither", true)]

0 commit comments

Comments
 (0)