mugit/testscript/http-clone.txtar (view raw)
| 1 | # http: clone |
| 2 | |
| 3 | git init local |
| 4 | cp readme.txt local/readme.txt |
| 5 | cp main.go local/main.go |
| 6 | git -C local add . |
| 7 | git -C local commit -m 'init' |
| 8 | |
| 9 | mugit repo new http-clone.git |
| 10 | git -C local push file://$REPOS/http-clone.git master |
| 11 | |
| 12 | |
| 13 | git clone $MURL/http-clone clone |
| 14 | exists clone/readme.txt |
| 15 | exists clone/main.go |
| 16 | |
| 17 | exec cat clone/readme.txt |
| 18 | stdout 'hello world' |
| 19 | |
| 20 | |
| 21 | # non existent repo |
| 22 | ! git clone $MURL/nonexistent-http-repo |
| 23 | stderr 'remote: repository not found' |
| 24 | |
| 25 | |
| 26 | -- readme.txt -- |
| 27 | hello world |
| 28 | |
| 29 | -- main.go -- |
| 30 | package main |
| 31 | |
| 32 | func main() { |
| 33 | println("hello") |
| 34 | } |