fetch-pack: call prepare_shallow_info only if v0
authorJonathan Tan <jonathantanmy@google.com>
Tue, 26 Mar 2019 19:31:20 +0000 (12:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Apr 2019 06:35:54 +0000 (15:35 +0900)
In fetch_pack(), be clearer that there is no shallow information before
the fetch when v2 is used - memset the struct shallow_info to 0 instead
of calling prepare_shallow_info().

This patch is in preparation for a future patch in which a v2 fetch
might call prepare_shallow_info() after shallow info has been retrieved
during the fetch, so I needed to ensure that prepare_shallow_info() is
not called before the fetch.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found