-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
gix fetch
with fast-forward support
#548
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…aking) Breaking indication in commit message has to happen later once things statbilize a bit more.
…me)`.(#450) It allows to stop traversals early if all commmits to be traversed are older than a given time.
The implementation for non-dry-run exists as well, but the test doesn't quite work yet.
prepare for making fast-forward calculations even if force is specified.
That way we emulate gits behaviour, which does the same unless it's turned off. The latter we don't allow yet as it should really be fast enough due to the date-cutoff during traversal.
Also known as 'anonymous remotes'.
…n similar to `git fetch` (#450)
…r for some reason (#450)
…lient::fetch::Response` (#450)
Unfortunately its test is in `git-repository`, but better than nothing.
That way it's easier where the error is coming from in terms of the protocol.
This just prints the ref-map, which will be determined to have no change at all.
…it still violates the protocol in dry-run mode as it actually has to get the pack, apparently the server can't be told to stop otherwise. Needs more experimentation as well.
This happens if the local transport is used, which goes by V1 by default and it's probably good to try supporting it if it's easy enough, instead of forcing V2 which we probably could.
Previously the NamedTempFile would receive every little write request for millions of objects, consuming considerable amounts of time. Now a buf writer alleviates this issue entirely.
Changed due to new naming of index and packs.
It is well-intended but is likely to hang the calling process if for any reason not all process output was consumed. Even though not waiting for the process leaves it running, it will stop naturally once its output pipe breaks once once our handles for it are inevitable dropped at the same time.
This demands explanation. Previously the issue was a blocking transport implementation on drop, but that has been fixed by simply letting the child process run into a broken pipe to stop it. Now existing early won't hang because of the transport being dropped with data still available on the stdout pipe. The issue to fix here is that keep-alive packets are not currently understood in V1, and git can send us empty packs.
Previously this was only done for ssh based connections, and requires setting an environment variable.
Now V2 is actually used in our local tests as well.
Keepalive packets are side-band only empty datalines that should just be ignored. This is now happening, allowing longer git operations to work as they will send keepalive packets every 5 seconds, and previously we would choke on it. Note that empty datalines are never send otherwise, making it a previously unused marker that can safely be skipped.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
use dry-run- it's OK to do as is I think, as fetch currently also does negotiation even in dry-run mode. Maybe that's something to avoid, maybe it's something that can help later. For now it will simply avoid receiving the pack entirely.fetch
ingix remote refs
to provide more detailed information about what would be done to refsgix fetch
to perform an actual fetch, with dry-run modepack-
prefixPerformance Issues
git_tempfile
uses a NamedTempFile under the hood, and that's not buffered. Probably should be wrapped into a buf-writer to assure decent write performance. Right now, 60% of CPU time go into writing a tempfile. BufWriter should be around it in the bundle writer.Performance Notes
For local clones, this time saving is absolutely significant as the whole history is typically cloned, and on CI it will be relative to the pack size which is greatly affected by
depth=1
. The latter seems to be used byactions/checkout@v3
though, and maybe one day @v4 will offergitoxide
instead if the configuration of auth works similarly to the on of git (extraHeaders for instance).Out of scope
Previous PR