mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 18:10:59 +00:00
api/internal/git: handle .git suffix in repospec
This change adds a new test case for parsing url with `.git` suffix. In that case, we should have the full url as clone spec with an empty abspath.
This commit is contained in:
@@ -125,7 +125,7 @@ func parseGitUrl(n string) (
|
||||
index := strings.Index(n, gitSuffix)
|
||||
orgRepo = n[0:index]
|
||||
n = n[index+len(gitSuffix):]
|
||||
if n[0] == '/' {
|
||||
if len(n) > 0 && n[0] == '/' {
|
||||
n = n[1:]
|
||||
}
|
||||
path, gitRef, gitTimeout, gitSubmodules = peelQuery(n)
|
||||
|
||||
Reference in New Issue
Block a user