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 git clone #179

Merged
merged 1 commit into from
Jun 21, 2024
Merged

use lightweight git clone #179

merged 1 commit into from
Jun 21, 2024

Conversation

kzadorozhny
Copy link
Member

@kzadorozhny kzadorozhny commented Jun 21, 2024

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 fetch --force --filter=blob:none --no-tags origin +refs/heads/deploy/*:refs/remotes/origin/deploy/*

@kzadorozhny kzadorozhny requested a review from a team as a code owner June 21, 2024 22:39
@kzadorozhny kzadorozhny merged commit f3ae719 into main Jun 21, 2024
6 checks passed
@kzadorozhny kzadorozhny deleted the optimized-prer-git-clone branch June 21, 2024 23:49
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.

1 participant