Defaulting a getdepth to 1 makes it difficult to switch branches if the branch is not available in the shallow clone, so make this optional. Also, instantiate OpenstackGitRepo properly: depth is not the fourth parameter.