mugit/testscript/cli-repo-new.txtar (view raw)
| 1 | mugit repo new new-test-repo |
| 2 | |
| 3 | |
| 4 | exists $REPOS/new-test-repo.git/HEAD |
| 5 | exists $REPOS/new-test-repo.git/objects/ |
| 6 | exists $REPOS/new-test-repo.git/refs/ |
| 7 | |
| 8 | |
| 9 | # missing repo name |
| 10 | ! mugit repo new |
| 11 | stderr 'no name provided' |
| 12 | |
| 13 | # repo already exists |
| 14 | mugit repo new existing-repo |
| 15 | ! mugit repo new existing-repo |
| 16 | stderr 'already exists' |
| 17 | |
| 18 | # invalid mirror URL |
| 19 | ! mugit repo new mirrored-repo --mirror 'invalid://url' |
| 20 | stderr 'only http and https remotes are supported' |
| 21 | ! exists $REPOS/mirrored-repo.git |
| 22 | |
| 23 | ! mugit repo new mirrored-repo-ssh --mirror 'git@github.com:olexsmir/gopher.nvim.git' |
| 24 | stderr 'only http and https remotes are supported' |
| 25 | ! exists $REPOS/mirrored-repo-ssh.git |