Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion worktree-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,11 @@ function wrktr_git() {
# -----------------------------------------------------------------------------
function _wrktr_sanitize_branch_name() {
local branch="$1"
branch="${branch//%/%25}"

if ! git check-ref-format --branch "$branch" >/dev/null 2>&1; then
return 1
fi

echo "${branch//\//%2F}"
}

Expand Down
Loading