fix: handle git branch name with special chars correctly - #39483
Open
wxiaoguang wants to merge 5 commits into
Open
wxiaoguang wants to merge 5 commits into
wxiaoguang wants to merge 5 commits into
Conversation
Contributor
Author
wxiaoguang
force-pushed
the
fix-git-branch-name
branch
from
September 30, 2026 08:07
0193b79 to
b7b0c1c
Compare
wxiaoguang
force-pushed
the
fix-git-branch-name
branch
from
September 30, 2026 08:16
b7b0c1c to
16e9cdc
Compare
go-shellquote escapes "{" but not "}", so a branch like "x{a}" becomes
"x\{a}", which zsh rejects with a parse error. util.ShellEscape
double-quotes such names instead.
Neither quoted a leading "#", so a branch like "go-gitea#123" turned the rest
of each command into a shell comment, making the instructions silently
do nothing.
Assisted-by: Claude Code:claude-opus-5-5
silverwind
approved these changes
Sep 30, 2026
silverwind
left a comment
Member
There was a problem hiding this comment.
used shared helper in 51d2f8c and added fixed on case with comments there.
bircni
approved these changes
Sep 30, 2026
bircni
enabled auto-merge (squash)
September 30, 2026 19:42
Member
|
https://github.com/go-gitea/gitea/actions/runs/36767498639/job/110065310088 is a unrelated mssql deadlock, checking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Fix the bugs: