Skip to content

Commit

Permalink
fix: substitute ':' to '__' in git_uri_to_dir_name
Browse files Browse the repository at this point in the history
  • Loading branch information
moyiz committed Jun 22, 2024
1 parent dbbee07 commit 4fcbfc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/git-dev/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ end
-- "https://github.com/example/repo.git" => "github.com__example__repo"
local function git_uri_to_dir_name(uri, branch)
local dir_name =
uri:gsub("/+$", ""):gsub(".*://", ""):gsub("/", "__"):gsub(".git$", "")
uri:gsub("/+$", ""):gsub(".*://", ""):gsub("[/:]", "__"):gsub(".git$", "")
if branch and branch ~= "" then
dir_name = dir_name .. "#" .. branch:gsub("/", "__")
end
Expand Down

0 comments on commit 4fcbfc3

Please sign in to comment.