summaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-19 04:34:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-19 04:34:07 (GMT)
commit0527fbab689929de47ab3fa7baf1e7618ffa704f (patch)
tree225a1b7916ff4b81f30d661f0014f973eea38642 /fetch-pack.c
parentd4cd2dd214c9800c8ccf45cf413acc727f4abcc2 (diff)
parente70a3030e747312327a4f3619247bf8a986aa577 (diff)
downloadgit-0527fbab689929de47ab3fa7baf1e7618ffa704f.zip
git-0527fbab689929de47ab3fa7baf1e7618ffa704f.tar.gz
git-0527fbab689929de47ab3fa7baf1e7618ffa704f.tar.bz2
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 49ab266..bff05ee 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"));
}