-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remote-https: do not call fetch-pack if using gvfs helper #240
remote-https: do not call fetch-pack if using gvfs helper #240
Conversation
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]>
07fe084
to
0aac91c
Compare
I'm concerned I don't understand the full context here. What's the full process stack here? Is Or are we seeing a top-level |
@@ -1046,6 +1046,9 @@ static int fetch_git(struct discovery *heads, | |||
struct argv_array args = ARGV_ARRAY_INIT; | |||
struct strbuf rpc_result = STRBUF_INIT; | |||
|
|||
if (core_use_gvfs_helper) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned this will effectively break remote-curl
aka remote-https
any time that gvfs-helper
is configured (and without regard for whether it is in use by the current process ancestry).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, when using gvfs-helper
we should avoid fetch-pack
at all times. We never want to ask for a pack in the traditional way. Am I wrong?
The only thing I can think of is if we are fetching a submodule, but we do not support that case right now.
No. gvfs-helper is not triggering this part of the stack.
I cannot reproduce this on my machine, but the way we are reproducing it is the following:
From what I can tell, the old read-object hook way of thinking was avoiding this |
/azp run microsoft.git |
Azure Pipelines successfully started running 1 pipeline(s). |
@jeffhostetler: I didn't fully explain the stack in my earlier message. I sent you a trace2 log via email. Here is the process stack:
This PR prevents process 3 from calling process 4 by intercepting the construction of the command-line arguments to |
See microsoft/git#240 and microsoft/git#243. Signed-off-by: Derrick Stolee <[email protected]>
…abled fetch-pack and block 'git update' See microsoft/git#240 and microsoft/git#243. Because of #320, we do not need to update the minimum Git version from `v2.25.0.vfs.1.1` even though we are packaging with `v2.25.0.vfs.1.3` now.
…g gvfs helper The `gvfs-helper` is supposed to avoid calling `git fetch-pack` by downloading objects through the GVFS protocol instead. For some reason, some `git fetch` calls still end up calling `git fetch-pack` which gets a complaint from the remote because it does not support that kind of fetch. Put a hard stop in the `fetch_git()` method to prevent this process run.
…g gvfs helper The `gvfs-helper` is supposed to avoid calling `git fetch-pack` by downloading objects through the GVFS protocol instead. For some reason, some `git fetch` calls still end up calling `git fetch-pack` which gets a complaint from the remote because it does not support that kind of fetch. Put a hard stop in the `fetch_git()` method to prevent this process run.
…g gvfs helper The `gvfs-helper` is supposed to avoid calling `git fetch-pack` by downloading objects through the GVFS protocol instead. For some reason, some `git fetch` calls still end up calling `git fetch-pack` which gets a complaint from the remote because it does not support that kind of fetch. Put a hard stop in the `fetch_git()` method to prevent this process run.
…g gvfs helper The `gvfs-helper` is supposed to avoid calling `git fetch-pack` by downloading objects through the GVFS protocol instead. For some reason, some `git fetch` calls still end up calling `git fetch-pack` which gets a complaint from the remote because it does not support that kind of fetch. Put a hard stop in the `fetch_git()` method to prevent this process run.
…g gvfs helper The `gvfs-helper` is supposed to avoid calling `git fetch-pack` by downloading objects through the GVFS protocol instead. For some reason, some `git fetch` calls still end up calling `git fetch-pack` which gets a complaint from the remote because it does not support that kind of fetch. Put a hard stop in the `fetch_git()` method to prevent this process run.
The
gvfs-helper
is supposed to avoid callinggit fetch-pack
by downloading objects through the GVFS protocol instead. For some reason, somegit fetch
calls still end up callinggit fetch-pack
which gets a complaint from the remote because it does not support that kind of fetch.Put a hard stop in the
fetch_git()
method to prevent this process run.