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

shallow support (Repository) #765

Closed
wants to merge 4 commits into from
Closed

shallow support (Repository) #765

wants to merge 4 commits into from

Conversation

Byron
Copy link
Member

@Byron Byron commented Mar 4, 2023

Tasks

  • make GIT_SHALLOW_FILE environment variable available via config - it's useful for hooks where this file isn't settled yet (and generally environment variables are used for this kind of thing)
  • inform about the shallow-ness of a repo based on presence of .git/shallow
  • read the .git/shallow file
  • validate that the 'commit not founds' during iteration is actually a grafted commit and fail otherwise remove special handling of guessed shallow commits - instead make it work properly.
  • assure we handle iteration on a complex shallow boundary correctly - after all we should be able to walk the whole graph

@Byron Byron mentioned this pull request Mar 5, 2023
27 tasks
@Byron Byron force-pushed the shallow-support branch from efc8bf4 to 2b677cf Compare March 5, 2023 15:22
@Byron Byron force-pushed the shallow-support branch from 2b677cf to 5bfbb9a Compare March 5, 2023 18:24
Previously, when traversing commits, we would assume to be in a
shallow repository if a commit's parent could not be found in the
repository.

Now we validate that assumption by reading the 'shallow' file to
check if the last seen commit is on the commit boundary.

This removes `is_shallow` and `error_on_missing_commit()` on the
`revision::walk::Platform` as shallow commits are now known and handled
without any guesswork.
@Byron
Copy link
Member Author

Byron commented Mar 6, 2023

already merged.

@Byron Byron closed this Mar 6, 2023
@Byron Byron deleted the shallow-support branch March 7, 2023 14:53
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.

1 participant