Shallow clone of git repo

It appears that the deployment pipeline of Cloudflare pages performs a shallow clone of git repositories.
I use Hugo as a static site generator, and there is a module that inspects the git repo to find some details on earlier commits, so that these git commit messages can be rendered in the website. This breaks when Cloudflare’s pipeline performs only a shallow clone.

Ideally, there would be some environment variable that lets us specify something like ‘git clone depth’ that specifies how many commits should be fetched.

2 Likes

I would also like to access the Git history in the pipeline to add timestamps for a static page. Is there a recommended method or approach for doing this? Is there any way to turn of shallow clones?

EDIT: This is a workaround: Git Last Modified front matter attribute not respected with 11ty - #3 by Anan