forked from git-for-windows/git
-
Notifications
You must be signed in to change notification settings - Fork 106
send-pack: do not check for sha1 file when GVFS_MISSING_OK set #68
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
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.
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.
@kewillford We should be a bit careful here. Specifically,
git pushstarts with aninfo/refscall to find the current branch tips. If those tips have moved ahead of our prefetch packfiles, then those commits will require the read-object hook. This logic will prevent those commits from being sent tosend-packand hence will not be considered as--notcommits in the revision walk. This can lead to over-pushing objects.In a particularly egregious case, think about a fresh clone with
masteras the only branch favorite. I clone, make a simple change, and push. Themasterbranch has moved ahead, but now we tellpack-objectsto pack our commit and sends zero--notcommits. We will pack the entire repo and try to push it.Let me know if I'm misunderstanding the effect of this change.
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.
It's more likely that I am missing something, as if
mastermoves ahead in a vanilla git repo, we don't have the object, so we continue without marking that as a--notcommit. Instead, we probably use ourrefs/remote/origin/...refs. I'm going to do some digging and come back to this soon.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 talked with @kewillford offline and we determined that I was wrong, for multiple reasons. I was misreading some things and it took a while to shake them all out. Here is my new understanding of what's going on:
git pushcallsgit remote-httpswhich callsgit send-pack.git send-packwould trigger theread-objecthook and somehow this was causing timing issues.read-objectcalls from thesend-packlogic by understanding we are in a virtualized environment andhas_sha1_file(hash)will always return true.--notcommits passed togit pack-objects.read-objecthook will still be run bygit pack-objects, but somehow this timing change prevents the failure.