Branch name editing should replace spaces with dashes
This is an amazing feature of Fork.app, and I'd love to have it on gitbutler.
When I go to edit the branch name, I can type bla bla branch. In real time, then I press the first spacebar after bla, it should turn into bla-. That way the branch names are always valid.
I could provide a PR, but I wanted to make sure there is an issue here first, and get your opinion.
Well, that might be a good to have indeed, but instead, a more comprehensive whitelist should be used, and only the characters given in
https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names#naming-branches-and-tags
Should be allowed.
I assume you're talking about the "Set branch name" dialog, so feel free to ignore me, but it kind of already works the way you describe if you rename a branch via the branch header instead:
https://github.com/gitbutlerapp/gitbutler/assets/52106/a0d95c02-2367-4873-9db2-56958f2697cf
yea exactly! but i wanted it from the three dots at the bottom right on your video, and then rename.
@pvinis under three dots menu we have set remote branch name dialog. When you submit your name, we replace spaces with dashes. Or you mean something different?
https://github.com/gitbutlerapp/gitbutler/assets/18498712/c15b0525-92e8-4727-a6df-5ec4f9e61041
@PavelLaptev ah yes. that's exactly what I mean.
I expected the string in that input field to replace the spaced already so it's obvious that it will happen.
Either keep that issue for that, or you can call it done and close it. 👍
I think there's still some room for improvement here but for now I think we handle this case well enough and will close. We have some changes lined up regarding the lanes anyway so I'd expect the UX surrounding this to improve quite a bit in the coming months ✌🏻
Thanks for the report!