0

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?

Doug
  • 6,460
  • 5
  • 59
  • 83

1 Answers1

1

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.

Mayur Birari
  • 5,837
  • 8
  • 34
  • 61
luksan
  • 186
  • 1
  • 5