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

Add support to new FULLGIT env variable #116

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

stronk7
Copy link
Member

@stronk7 stronk7 commented Apr 11, 2024

With that new env variable, any git repository being copied to the container (or mounted as volume in the future) it's possible to:

  • dissociate any --reference repository completely.
  • un-shallow the repo if it was cloned with --depth
  • get access to all branches if it was cloned with --single-branch

Note that it defaults to disabled (empty), so none of the current supported jobs will use that new feature.

But other, incoming, jobs, needing a full clone to be able to play with the repository (fetch, merge, checkout, ...) will have it enabled to ensure that the repository is complete and free of dependencies.

With that new env variable, any git repository being copied
to the container (or mounted as volume in the future) it's possible to:
- dissociate any --reference repository completely.
- un-shallow the repo if it was cloned with --depth
- get access to all branches if it was cloned with --single-branch

Note that it defaults to disabled (empty), so none of the current
supported jobs will use that new feature.

But other, incoming, jobs, needing a full clone to be able to
play with the repository (fetch, merge, checkout, ...) will have
it enabled to ensure that the repository is complete and free
of dependencies.
@stronk7
Copy link
Member Author

stronk7 commented Apr 11, 2024

For the records, all the git operations needed to un-reference, un-shallow and fetch all branches here are executed in less than 30 seconds, that I think that it's initially acceptable.

Further improvements can come later, if some day we are able to change to filtered (blob-less and friends) repos, but for now it's ok (note that the same time will be needed if/when we switch to mounted volume, though for now, I think it's better to stick with docker cp, that way the host repo is not modified, only the container copy.

Ciao :-)

@andrewnicols andrewnicols merged commit 9b46db1 into moodlehq:main Apr 11, 2024
5 checks passed
@stronk7 stronk7 deleted the support_full_git branch April 11, 2024 16:01
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