fork-dev / Tracker

Bug and issue tracker for Fork for Mac
498 stars 12 forks source link

[Feature Request] Sanitize branch names when pasting into Create Branch dialog #1964

Open Mashnin opened 10 months ago

Mashnin commented 10 months ago

Git does not allow certain symbols in branch names, for example "^", "*", "\", "[" and more. Fork of course prevents user from creating branches with these symbols. However I ofter create branch names by copying task names from project tracking software like Jira. Sometimes tasks are named like this: "[FeatureName] Task name". When the string I try to paste contains forbidden symbols, Fork just makes a beep sound and does not paste anything. I have to paste the string in a text editor and manually remove these symbols, and paste in Fork again. On the contrary, SourceTree allows to paste any string, but disables Create button and shows a message informing that branch name is invalid. I attached screenshot of the dialog. May I suggest that you implement something similar in Fork? I think it would be even better if Fork just automatically dropped forbidden characters.

Screenshot 2023-09-07 at 01 47 49