Skip to content

shallow support (Repository)#765

Closed
Sebastian Thiel (Byron) wants to merge 4 commits into
mainfrom
shallow-support
Closed

shallow support (Repository)#765
Sebastian Thiel (Byron) wants to merge 4 commits into
mainfrom
shallow-support

Conversation

@Byron
Copy link
Copy Markdown
Member

@Byron Sebastian Thiel (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

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
Copy Markdown
Member Author

already merged.

@Byron Sebastian Thiel (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