Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit e42062e

Browse files
Adding validation to branch creation
1 parent ef2f84b commit e42062e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/BranchesView.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,8 @@ private void OnCreateGUI()
452452
var cannotCreate = selectedNode == null ||
453453
selectedNode.Type == NodeType.Folder ||
454454
newBranchName == null ||
455+
newBranchName.StartsWith("/") ||
456+
newBranchName.EndsWith("/") ||
455457
!Utility.BranchNameRegex.IsMatch(newBranchName);
456458

457459
// Create on return/enter or cancel on escape

0 commit comments

Comments
 (0)