Simplify the logic around the git_clone_update function