Skip to content
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

Precompute list of needed blobs before a checkout #36

Closed
jrbriggs opened this issue Aug 9, 2019 · 7 comments
Closed

Precompute list of needed blobs before a checkout #36

jrbriggs opened this issue Aug 9, 2019 · 7 comments
Assignees
Milestone

Comments

@jrbriggs
Copy link
Member

jrbriggs commented Aug 9, 2019

Rather than fall back on read-object one-by-one, let's precompute what's needed, a la partial.

@derrickstolee
Copy link
Contributor

For discussion: To get this ready for the Demo milestone, we may want an in-between:

  1. I'll get the sparse-checkout builtin completed, which performs the read-tree and reset operations.

  2. We can create a scalar sparse-checkout verb that first runs a scalar prefetch --folders then runs git sparse-checkout add.

Long-term, we definitely want Git to handle this by itself. However, to get this full list precomputed we will need Git changes for the precompute (this issue) and the batched read-object hook (#7).

@jrbriggs
Copy link
Member Author

@derrickstolee Thanks for starting the discussion.

I think your proposal satisfies the requirements for manipulating the set of folders in the sparse enlistment without moving what HEAD points to, but I don't think it fully addresses computing the list of blobs when we checkout or reset. Right now scalar prefetch --folders reads HEAD to determine the commit ID to prefetch, so I think there's a bit of extra work in step 2 if we also want this to address moving the HEAD ref.

@derrickstolee
Copy link
Contributor

Right now scalar prefetch --folders reads HEAD to determine the commit ID to prefetch, so I think there's a bit of extra work in step 2 if we also want this to address moving the HEAD ref.

True. My proposal will only fix that initial hydration on a fresh clone. A branch-switch would still use the read-object hook for the blobs that changed between.

@github-actions
Copy link

Labeling this issue as stale. There has been no activity for 30 days. Remove stale label or comment or this issue will be closed in 7 days.

@github-actions github-actions bot added the no-activity Stale issue or PR that will be automatically closed soon. label Aug 17, 2019
@jrbriggs jrbriggs removed the no-activity Stale issue or PR that will be automatically closed soon. label Aug 17, 2019
@github-actions
Copy link

Labeling this issue as stale. There has been no activity for 30 days. Remove stale label or comment or this issue will be closed in 7 days.

@github-actions github-actions bot added the no-activity Stale issue or PR that will be automatically closed soon. label Aug 19, 2019
@jrbriggs jrbriggs removed the no-activity Stale issue or PR that will be automatically closed soon. label Aug 19, 2019
@jeffhostetler
Copy link
Contributor

This is being addressed in: microsoft/git#191

@jeffhostetler
Copy link
Contributor

marking closed along with #7

derrickstolee added a commit that referenced this issue Oct 4, 2019
…ject hook

See microsoft/git#191 for the Git code regarding the GVFS transport layer. This can work in tandem with the read-object hook, but it _should_ make the read-object hook irrelevant.

* Delete all references to the read-object hook in the product code. This unblocks #4 and the [Mount Removal] tasks #15,  #132, #133, #135, #136, and possible others.

* Delete the Sparse Verb in favor of `git sparse-checkout set`.

* Delete the `BlobPrefetcher` and all references to `--files` or `--folders` prefetching.

Resolves #6, #7, #36.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants