Let parseRepoUrl accept a repository URL that ends in .git and a slash #11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
parseRepoUrlin web/js/tools/clone.js strips.gitand then trailing slashes, in that order. Forhttps://github.com/o/r.git/the.gitis not at the end when it is stripped, so the result hasrepo: "r.git"and the clone step asks for a repository that does not exist. Why it matters: People paste clone URLs from many places; one trailing slash should not turn a valid URL into a confusing not-found error.Proposal
Strip trailing slashes first and then
.git, and change nothing else.Acceptance criteria
parseRepoUrl("https://github.com/o/r.git/")returns{ host: "github", owner: "o", repo: "r", branch: null }, andparseRepoUrl("https://github.com/o/r/tree/dev")still returns branch"dev".parseRepoUrl("https://bitbucket.org/o/r.git/")returns{ host: "bitbucket", owner: "o", repo: "r", branch: null }, andparseRepoUrl("https://example.org/o/r")still throws an Error.Files
web/js/tools/clone.jsT2T-Issue: 0xb39df7f42e2f2a5fe2272fbd62986ee6a0738e02391e5725f8b27a3a20f68b29
Number: 8
Kind: bug
Origin: imported
Proposer: 0x08809b42d05ae9526f4aa4c9670ce168aac68919
Ledger: elffuss/ledger, event 493