Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpanm: use depth 1 when cloning for git repos #663

Open
shawnlaffan opened this issue Jul 26, 2023 · 0 comments
Open

cpanm: use depth 1 when cloning for git repos #663

shawnlaffan opened this issue Jul 26, 2023 · 0 comments

Comments

@shawnlaffan
Copy link

Running cpanm on a git repo clones the entire repo. For large repos this can lead to large downloads that take a reasonable amount of time.

So far as I can tell the relevant code is at this line:

$self->run_command([ 'git', 'clone', $uri, $dir ]);

Unless I'm missing something only the latest commit should be needed, so this line could be changed to:

$self->run_command([ 'git', 'clone', '--depth', '1', $uri, $dir ]);

Please let me know if a PR would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant