Skip to content

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

3 participants