Skip to content

Commit ce24ebc

Browse files
derrickstoleedscho
authored andcommitted
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 <dstolee@microsoft.com>
1 parent 9c1c730 commit ce24ebc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

remote-curl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,9 @@ static int fetch_git(struct discovery *heads,
11751175
struct strvec args = STRVEC_INIT;
11761176
struct strbuf rpc_result = STRBUF_INIT;
11771177

1178+
if (core_use_gvfs_helper)
1179+
return 0;
1180+
11781181
strvec_pushl(&args, "fetch-pack", "--stateless-rpc",
11791182
"--stdin", "--lock-pack", NULL);
11801183
if (options.followtags)

0 commit comments

Comments
 (0)