Is it possible to use NGit to clone repository, but get the size of a repo before you simply "download it"?
I am trying to build a client, and I'd like to actually display progress or have the option of cancelling it if its too huge.
Is there a way to do this using code?
No, there is no way to know how much data will you will need to transfer before cloning/fetching using the git transport protocol.
If you clone via dumb-HTTP you could probably get the pack-file sizes from the web server.