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

Change git-lfs migrate import --everything to migrate everything except for special git refs #5045

Merged
merged 2 commits into from Jun 15, 2022

Conversation

wuhaochen
Copy link
Contributor

This PR implements @bk2204 's suggestion in #4810 to only exclude special git refs.

@wuhaochen wuhaochen requested a review from a team as a code owner June 11, 2022 19:34
Copy link
Member

@bk2204 bk2204 left a comment

Choose a reason for hiding this comment

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

Hey, thanks for the patch, and welcome to Git LFS!

This looks mostly correct. I think there's one change we should make to the code, and some tests, probably in t/t-migrate-import.sh, would also be a good idea.

}
prefix := strings.Join(parts[:2], "/")
switch prefix {
case "refs/notes", "refs/bisect", "refs/replace":
Copy link
Member

Choose a reason for hiding this comment

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

I think we'll also want to include refs/stash here, since we won't want to rewrite stashes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a small unit test, I'll probably need a bit more time to figure out the how to get the test right in .sh unless people want to give some help on generating examples of excluded refs.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is probably fine as it stands.

}
prefix := strings.Join(parts[:2], "/")
switch prefix {
case "refs/notes", "refs/bisect", "refs/replace":
Copy link
Member

Choose a reason for hiding this comment

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

I think this is probably fine as it stands.

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

2 participants