Separates removing the ssh:// and git@ prefixes into two expressions. Additionally, replaces : with /.
This means the initial $GIT_REPO variable can be something like git@github.com:my-org/my-repo and still be cloned by this function, avoiding URL using bad/illegal format or missing URL errors.
Separates removing the
ssh://
andgit@
prefixes into two expressions. Additionally, replaces:
with/
.This means the initial
$GIT_REPO
variable can be something likegit@github.com:my-org/my-repo
and still be cloned by this function, avoidingURL using bad/illegal format or missing URL
errors.