URI-encode most characters in branch names for `compare` command
It's especially important to encode the `#` character, because it would get interpreted as a URI fragment identifier. However, we let `url.QueryEscape` encode any other unsafe characters, except allowing special characters like `/!:^~` to appear raw. Most of these characters aren't allowed in branch names anyway, but they can appear as git revision expressions such as `feature^` or `mislav:feature~3`.
Showing
想要评论请 注册 或 登录