Do not use --depth=1 if the server does not support it.

Fixes #744