krebs / krops

Mirror of https://cgit.krebsco.de/krops/about/ (PRs / issues accepted, as can be seen by not having them disabled)
Do What The F*ck You Want To Public License
132 stars 18 forks source link

add shallow option to git source type #21

Closed elohmeier closed 4 years ago

elohmeier commented 4 years ago

Motivation

For most of our deployments only a specific revision is needed when using the git source type, not the full history.

Things changed

This introduces the shallow option to the git source type, which uses --depth=1 to fetch only a specific revision.

This saves disk space, time and bandwith - e.g. when cloning a big repo like nixpkgs.

4z3 commented 4 years ago

Would it be possible to add a depth parameter to the existing git source type?

elohmeier commented 4 years ago

@4z3 We could add a "shallow" option to the git source type, triggering --depth=1. That would remove redundancies.

elohmeier commented 4 years ago

@4z3 Updated the PR description and integrated the changes into the git source type.