Skip to content

git: fetch and clone --filter support #1375

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 1 commit into from
Jan 15, 2025

Conversation

EarthCompass
Copy link
Contributor

@EarthCompass EarthCompass commented Jan 13, 2025

This PR adds Filter support for git clone and fetch. #713

I see an open PR #1108 that implemented this for fetch but was left open somehow. This is a more complete version of #1108.

Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EarthCompass thank you for proposing this PR, this exposes the --filter feature, but due to the lack of partial clones support, it will result in a git repository that is not "fully operational" as a) we are not adding the metadata needed for git to know this is a partial clone and b) we are not handling missing objects.

IMO, that's OK, as this already enables traversing the Git metadata quite cheaply. It also enable users with Git knowledge to achieve optimal performance when using go-git.
Either way, I will create an issue to track partial clones support.

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.

2 participants