aboutsummaryrefslogtreecommitdiffstats
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-19 13:34:07 +0900
committerJunio C Hamano <gitster@pobox.com>2018-10-19 13:34:07 +0900
commit0527fbab689929de47ab3fa7baf1e7618ffa704f (patch)
tree225a1b7916ff4b81f30d661f0014f973eea38642 /fetch-pack.c
parentMerge branch 'ds/commit-graph-leakfix' (diff)
parentfetch: do not list refs if fetching only hashes (diff)
downloadgit-0527fbab689929de47ab3fa7baf1e7618ffa704f.tar.gz
git-0527fbab689929de47ab3fa7baf1e7618ffa704f.zip
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.c2
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"));
}