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

Implements .promisor packfile detection #5996

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

olsen232
Copy link

A .pack file can be marked as being "keep" or "promisor" if a file exists next to it with the same name but a different extension. Before this change, .keep files were being checked but .promisor were not. Now both are being checked (but neither one is used for anything).

Tidies up the code in git_packfile_alloc slightly - the logic of "only search for related files if an extension is present" is actually the same as before, but before it wasn't as clear.

Reuses the git_disable_pack_keep_file_checks config variable.

The plan is to use this to report certain missing objects as being "promised" in a partial clone, so that clients can treat those objects differently to objects that simply don't exist or are corrupted for some reason - perhaps fetching them if needed. See #5564

Uses the same test-repo as #5993 (also waiting for review).

Possible objections:

  • currently this opens the packfile directly from the fixture, as opposed to using a sandbox. But, it shouldn't modify the packfile. Nevertheless this may be against policy.
  • maybe we need another variable instead of reusing git_disable_pack_keep_file_checks, or maybe it should be renamed.

More-or-less a subset of #5776, except that this PR also has tests - that PR had a larger scope than this one and has been closed for reasons not relevant to this one.

A .pack file can be marked as being "keep" or "promisor" if a file
exists next to it with the same name but a different extension.
Before this change, .keep files were being checked but .promisor were
not. Now both are being checked (but neither one is used for anything).
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

Successfully merging this pull request may close these issues.

None yet

1 participant