Merge branch 'jt/avoid-ls-refs'

Over some transports, fetching objects with an exact commit object
name can be done without first seeing the ref advertisements.  The
code has been optimized to exploit this.

* jt/avoid-ls-refs:
  fetch: do not list refs if fetching only hashes
  transport: list refs before fetch if necessary
  transport: do not list refs if possible
  transport: allow skipping of ref listing
This commit is contained in:
Junio C Hamano
2018-10-19 13:34:07 +09:00
7 changed files with 114 additions and 13 deletions

View File

@ -1626,7 +1626,7 @@ struct ref *fetch_pack(struct fetch_pack_args *args,
parse_list_objects_filter(&args->filter_options, "blob:none");
}
if (!ref) {
if (version != protocol_v2 && !ref) {
packet_flush(fd[1]);
die(_("no matching remote head"));
}