Shallow git clone?

Does the git clone step do a shallow clone? It takes 30 seconds to do a clone. When I run a clone locally, that’s how long it takes for a non-shallow clone.

There’s probably nobody using CF that wants to clone the entire git repo. All we want is the head.

If CF is cloning the entire repo, can a flag be added (or just change the default behavior) so that it is doing a shallow clone? Or, maybe an option for the depth?

It’s really simple to implement -–depth 1.

1 Like

Hello Joshua

Yes of course you are right. We are aware of this and it is already in the backlog. I will ask our engineering for an update.

In the meantime, as a temporary workaround you can use git manually like any other step:

Welcome to the Codefresh community!

1 Like

Hello

This has now been implemented Git-Clone · Codefresh | Docs

There is a new “depth” option in the git clone step.