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

Use Git Large File Storage for snapshot images #1824

Merged
merged 3 commits into from
Dec 1, 2022
Merged

Use Git Large File Storage for snapshot images #1824

merged 3 commits into from
Dec 1, 2022

Conversation

calda
Copy link
Member

@calda calda commented Nov 29, 2022

This PR adopts Git Large File Storage for our snapshot images. This should reduce the default size of the repo by ~130MB (the size of Tests/__Snapshots__) and will prevent the git history from growing arbitrarily large.

@calda
Copy link
Member Author

calda commented Nov 30, 2022

After merging this PR I'll rewrite the git history of master to use LFS, so a typical checkout done by a package manager will no longer need to download any of these images or their existing git history.

To prevent breaking any existing projects referencing specific commits on master (e.g. either though using explicit commit shas in their Package.swift / Podfile / Cartfile, or as recorded in Package.resolved / Podfile.lock / Cartfile.resolved), I'll publish a tag of the current master branch. This makes sure that existing commits can still be downloaded even if they're no longer present on master. I confirmed that all three package managers support this type of change.

I decided to not rewrite the history of master. Swift Package Manager always downloads the full repository, so moving commits from master to a different branch doesn't reduce the amount of data that SPM downloads. We can't delete existing commits since that breaks existing integrations for our consumers. Fortunately adopting LFS reduces the size of a default checkout from 375MB to 215MB (which is good progress) and prevents the repo from growing significantly larger.

@calda
Copy link
Member Author

calda commented Dec 1, 2022

ptal @erichoracek

Copy link
Collaborator

@erichoracek erichoracek left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, glad we can take this approach

@erichoracek
Copy link
Collaborator

@calda One thought—do we need a guide for contributors to pull later changes after force pushing to master?

@calda calda merged commit 6b96292 into master Dec 1, 2022
@calda calda deleted the cal--git-lfs branch December 1, 2022 18:26
calda added a commit that referenced this pull request Dec 7, 2022
iago849 pushed a commit to atteamapps/lottie-ios that referenced this pull request Feb 8, 2024
iago849 pushed a commit to atteamapps/lottie-ios that referenced this pull request Feb 8, 2024
MoroziOS pushed a commit to MoroziOS/tmg-lottie-ios that referenced this pull request May 22, 2024
MoroziOS pushed a commit to MoroziOS/tmg-lottie-ios that referenced this pull request May 22, 2024
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