update clone functions in repo, add repo_clone_test