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 lightweight checkout #180

Merged
merged 1 commit into from
Jun 25, 2024
Merged

use lightweight checkout #180

merged 1 commit into from
Jun 25, 2024

Conversation

kzadorozhny
Copy link
Member

Optimize git commands used by the create_gitops_prs tool to support referencing shallow repository clones via --mirror parameter.

Replace gitops repository clone command:

git clone --no-checkout --reference <mirrorDir>  <repo> <gitopsWorkDir>

with the sequence of commands:

git clone --no-checkout  --single-branch --branch <primaryBranch> --filter=blob:none  --no-tags --reference <mirrorDir>  <repo> <gitopsWorkDir>
git remote set-branches --add origin "deploy/*"
git fetch --force --filter=blob:none --no-tags origin

@kzadorozhny kzadorozhny requested a review from a team as a code owner June 22, 2024 00:28
@kzadorozhny kzadorozhny merged commit 6c99281 into main Jun 25, 2024
6 checks passed
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