I had a script to extract certain files or folders from a Git repository with history, and it’s stopped working. Anyone know what might be wrong?

gist.github.com/uliwitnes…

The repository is here: github.com/uliwitnes…