1
0
forked from a/repotool
This commit is contained in:
a 2025-07-06 12:57:04 -05:00
parent 3883292bd6
commit ec647555b5
No known key found for this signature in database
GPG Key ID: 2F22877AA4DFDADB
3 changed files with 3465 additions and 3 deletions

View File

@ -7,7 +7,7 @@ REPOTOOL_PATH ?= ${HOME}/repo
all: dist/repotool all: dist/repotool
install: dist/repotool shell/zsh/repotool.zsh shell/zsh/repotool.plugin.zsh install: dist/repotool shell/repotool.zsh shell/repotool.plugin.zsh
mkdir -p ${REPOTOOL_PATH}/.bin/ mkdir -p ${REPOTOOL_PATH}/.bin/
mkdir -p ${REPOTOOL_PATH}/.shell/ mkdir -p ${REPOTOOL_PATH}/.shell/
install dist/repotool ${REPOTOOL_PATH}/.bin/ install dist/repotool ${REPOTOOL_PATH}/.bin/

3453
lib/luaunit.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,9 +7,18 @@ function git.parse_url(url)
local domain, path local domain, path
-- Check if it's an HTTP(S) URL -- Check if it's an HTTP(S) URL
domain, path = url:match("^https?://[^/]*@?([^/]+)/(.+)%.git$") -- First try without authentication
domain, path = url:match("^https?://([^@/]+)/(.+)%.git$")
if not domain then if not domain then
domain, path = url:match("^https?://[^/]*@?([^/]+)/(.+)$") domain, path = url:match("^https?://([^@/]+)/(.+)$")
end
-- If that didn't match, try with authentication
if not domain then
domain, path = url:match("^https?://[^@]+@([^/]+)/(.+)%.git$")
end
if not domain then
domain, path = url:match("^https?://[^@]+@([^/]+)/(.+)$")
end end
-- Check if it's an SSH URL (git@host:path or ssh://...) -- Check if it's an SSH URL (git@host:path or ssh://...)