protected function getCloneCommandCallback($path, $ref, $command)
    {
        return function ($url) use ($ref, $path, $command) {
            return sprintf($command, ProcessExecutor::escape($url), ProcessExecutor::escape($path), ProcessExecutor::escape($ref));
        };
    }