Open xaviergmail opened 1 year ago
@xaviergmail this sounds super reasonable. Thanks for the report. It may take us a while to get to this, but anybody is welcome to implement this and put up a PR in the meantime.
This is supported in a similar project I maintain called multi-gitter. You might want to check it out.
By default, it runs with a depth of 1. But any depth can be chosen.
Describe the solution you'd like I would like a new
--clone-depth
CLI flag added, to be passed tocloneLocalRepository
'sgit.CloneOptions
.Describe alternatives you've considered I also considered keeping the repositories cloned in a static non-temporary directory for faster batch operations across several repos which would be faster, but this seems easier to implement.
Additional context This would speed up running git-xargs in our org tremendously. We have ~180 repos, only a few archived but a
--dry-run
--skip-archived-repos
with justecho hi
as the script still takes 12 minutes, presumably due to large git histories with non-LFS binary data.