# vi: set ft=conf # convert crlf to lf on windows [windows] dos2unix readme.md branch_list.1.txt info.txt # create a repo soft repo create repo1 -d 'description' -H -p -n 'repo11' soft repo hidden repo1 stdout true soft repo private repo1 stdout true ! exists $DATA_PATH/repos/repo1.git/git-daemon-export-ok soft repo description repo1 stdout 'description' readfile $DATA_PATH/repos/repo1.git/description 'description' soft repo project-name repo1 stdout 'repo1' # clone repo git clone ssh://localhost:$SSH_PORT/repo1 repo1 # create some files, commits, tags... mkfile ./repo1/README.md '# Project\nfoo' git -C repo1 add -A git -C repo1 commit -m 'first' git -C repo1 tag v0.1.0 git -C repo1 push origin HEAD git -C repo1 push origin HEAD --tags # create lfs files, use ssh git-lfs-transfer git -C repo1 lfs install --local git -C repo1 lfs track '*.png' git -C repo1 lfs track '*.mp4' mkfile ./repo1/foo.png 'foo' mkfile ./repo1/bar.png 'bar' git -C repo1 add -A git -C repo1 commit -m 'lfs' git -C repo1 push origin HEAD # info soft repo info repo1 cmp stdout info.txt # list tags soft repo tag list repo1 stdout 'v0.1.0' # delete tag soft repo tag delete repo1 v0.1.0 soft repo tag list repo1 ! stdout . # print tree soft repo tree repo1 cp stdout tree.txt grep '.gitattributes' tree.txt grep 'README.md' tree.txt grep 'foo.png' tree.txt grep 'bar.png' tree.txt # cat blob soft repo blob repo1 README.md cmp stdout readme.md # cat blob that doesn't exist ! soft repo blob repo1 README.txt ! stdout . stderr '.*revision does not exist.*' # check main branch soft repo branch default repo1 stdout master # create a new branch git -C repo1 checkout -b branch1 git -C repo1 push origin branch1 soft repo branch list repo1 cmp stdout branch_list.1.txt # change default branch soft repo branch default repo1 branch1 soft repo branch default repo1 stdout branch1 # cannot delete main branch ! soft repo branch delete repo1 branch1 # delete other branch soft repo branch delete repo1 master soft repo branch list repo1 stdout branch1 -- readme.md -- # Project\nfoo -- branch_list.1.txt -- branch1 master -- info.txt -- Project Name: repo11 Repository: repo1 Description: description Private: true Hidden: true Mirror: false Default Branch: master Branches: - master Tags: - v0.1.0