From 968175d0b461565fae1046eb8c071e2f8aeae42f Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 3 Feb 2020 15:33:26 -0500 Subject: [PATCH] remote-curl: do not call fetch-pack when using gvfs-helper When using the GVFS protocol, we should _never_ call "git fetch-pack" to attempt downloading a pack-file via the regular Git protocol. It appears that the mechanism that prevented this in the VFS for Git world is due to the read-object hook populating the commits at the new ref tips in a different way than the gvfs-helper does. By acting as if the fetch-pack succeeds here in remote-curl, we prevent a failed fetch. Signed-off-by: Derrick Stolee --- remote-curl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/remote-curl.c b/remote-curl.c index 0b6d7815fd..36ca0f1cbc 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -1172,6 +1172,9 @@ static int fetch_git(struct discovery *heads, struct strvec args = STRVEC_INIT; struct strbuf rpc_result = STRBUF_INIT; + if (core_use_gvfs_helper) + return 0; + strvec_pushl(&args, "fetch-pack", "--stateless-rpc", "--stdin", "--lock-pack", NULL); if (options.followtags)