I've found that using Git libraries directly is usually slow and less ergonomic. I've got another tool (written in Go) here: https://github.com/zikani03/git-monorepo which uses a Git library and is a bit slow.
But I'm willing to take up that challenge and test out gix, I've regained my interest in Rust so the timing is good :)
Now I'm curious -- is that here a way to do this that avoids downloading any more than strictly necessary?
The command above downloads the whole repo history. You could do a depth=1 to skip the history, but it still downloads the he latest version of the entire repo tree.
I have a similar problem with hugging face. I do git clone and it doesn't download models. I know it's supposed to use LFS, but I don't know how to make it work, I tried everything. I had to install their disgusting Python CLI to download a model.
svn checkout https://github.com/tensorflow/tensorflow/trunk/tensorflow/ex...