Skip to content

Commit c5a4a8f

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 9bb58b4 commit c5a4a8f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: remote-curl.c

+3
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,9 @@ static int fetch_git(struct discovery *heads,
11961196
struct strvec args = STRVEC_INIT;
11971197
struct strbuf rpc_result = STRBUF_INIT;
11981198

1199+
if (core_use_gvfs_helper)
1200+
return 0;
1201+
11991202
strvec_pushl(&args, "fetch-pack", "--stateless-rpc",
12001203
"--stdin", "--lock-pack", NULL);
12011204
if (options.followtags)

0 commit comments

Comments
 (0)