Size of git repo when fetched

I'm trying to build a cargo project in a flatpak (first time) and each time flatpak-builder is building, it fetches all crates. (expected when ran within a container)

But the fetch stage takes 20 or so minutes on my slow connection. It seems to take a long time getting git repos and is really fast on the index.
Updating git repository '' Updating git submodule '' Updating git submodule ''

Is fetch, cloning the entire git history, or just the current 'snapshot' of the files?
I don't know enough about the internals of cargo/rust or git, but it'll be great if cargo only download's the minimum git data to compile.

p.s. At the moment I need the latest gtk-rs and not the current version.

It is cloning the entire git repo. Shallow clones are discouraged by github as they increase load on their servers due to being unable to push pack files that are already created. Also by cloning the entire git repo future updates are much faster.

1 Like