Getting the size of a clone with NGit

114 views Asked by At

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?

1

There are 1 answers

1
luksan On

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.