Skip to content

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
@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.

2 participants