Skip to content

Commit 1a44eec

Browse files
committed
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 <[email protected]>
1 parent 79fd761 commit 1a44eec

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
@@ -1047,6 +1047,9 @@ static int fetch_git(struct discovery *heads,
10471047
struct argv_array args = ARGV_ARRAY_INIT;
10481048
struct strbuf rpc_result = STRBUF_INIT;
10491049

1050+
if (core_use_gvfs_helper)
1051+
return 0;
1052+
10501053
argv_array_pushl(&args, "fetch-pack", "--stateless-rpc",
10511054
"--stdin", "--lock-pack", NULL);
10521055
if (options.followtags)

0 commit comments

Comments
 (0)