From: Jonathan Tan Date: Thu, 27 Sep 2018 19:24:07 +0000 (-0700) Subject: fetch: do not list refs if fetching only hashes X-Git-Tag: v2.20.0-rc0~150^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e70a3030e747312327a4f3619247bf8a986aa577?hp=e70a3030e747312327a4f3619247bf8a986aa577 fetch: do not list refs if fetching only hashes If only hash literals are given on a "git fetch" command-line, tag following is not requested, and the fetch is done using protocol v2, a list of refs is not required from the remote. Therefore, optimize by invoking transport_get_remote_refs() only if we need the refs. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano ---