Skip to content

Commit 9f09b8e

Browse files
committed
enhance: allow # character in branch name (#271)
1 parent 91801cf commit 9f09b8e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/ViewModels/CreateBranch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace SourceGit.ViewModels
66
public class CreateBranch : Popup
77
{
88
[Required(ErrorMessage = "Branch name is required!")]
9-
[RegularExpression(@"^[\w\-/\.]+$", ErrorMessage = "Bad branch name format!")]
9+
[RegularExpression(@"^[\w\-/\.#]+$", ErrorMessage = "Bad branch name format!")]
1010
[CustomValidation(typeof(CreateBranch), nameof(ValidateBranchName))]
1111
public string Name
1212
{

src/ViewModels/GitFlowStart.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace SourceGit.ViewModels
66
public class GitFlowStart : Popup
77
{
88
[Required(ErrorMessage = "Name is required!!!")]
9-
[RegularExpression(@"^[\w\-/\.]+$", ErrorMessage = "Bad branch name format!")]
9+
[RegularExpression(@"^[\w\-/\.#]+$", ErrorMessage = "Bad branch name format!")]
1010
[CustomValidation(typeof(GitFlowStart), nameof(ValidateBranchName))]
1111
public string Name
1212
{

src/ViewModels/RenameBranch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public Models.Branch Target
1212
}
1313

1414
[Required(ErrorMessage = "Branch name is required!!!")]
15-
[RegularExpression(@"^[\w\-/\.]+$", ErrorMessage = "Bad branch name format!")]
15+
[RegularExpression(@"^[\w\-/\.#]+$", ErrorMessage = "Bad branch name format!")]
1616
[CustomValidation(typeof(RenameBranch), nameof(ValidateBranchName))]
1717
public string Name
1818
{

0 commit comments

Comments
 (0)