Skip to content

Commit

Permalink
remote-curl: do not call fetch-pack when using gvfs-helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
derrickstolee authored and dscho committed Sep 27, 2022
1 parent d8295e5 commit 0d35efd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions remote-curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,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)
Expand Down

0 comments on commit 0d35efd

Please sign in to comment.