diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-10-19 07:34:07 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-19 07:34:07 +0300 |
commit | 0527fbab689929de47ab3fa7baf1e7618ffa704f (patch) | |
tree | 225a1b7916ff4b81f30d661f0014f973eea38642 /fetch-pack.c | |
parent | d4cd2dd214c9800c8ccf45cf413acc727f4abcc2 (diff) | |
parent | e70a3030e747312327a4f3619247bf8a986aa577 (diff) |
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
Diffstat (limited to 'fetch-pack.c')
-rw-r--r-- | fetch-pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 49ab2666b9..bff05ee69e 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -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")); } |