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

libgit2: fix checkout logic for CheckoutBranch #750

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

aryan9600
Copy link
Member

Use the target commit, to checkout tree and set the head to the desired
branch instead of doing a hard reset to the target commit.

This fixes a regression introduced alongside optimized git clones logic, which would not checkout the repo to the specified branch. This does not affect source-controller, but it does affect the image-automation-controller, since it further uses the cloned repo, to commit changes and push to origin.

Signed-off-by: Sanskar Jaiswal [email protected]

@aryan9600 aryan9600 added area/git Git related issues and pull requests bug Something isn't working labels May 31, 2022
Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks for finding out the issue and fixing it.

@darkowlzz
Copy link
Contributor

Please rebase so that we can merge it.

Use the target commit, to checkout tree and set the head to the desired
branch instead of doing a hard reset to the target commit.

Signed-off-by: Sanskar Jaiswal <[email protected]>
@darkowlzz darkowlzz merged commit 8a99fc7 into fluxcd:main Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/git Git related issues and pull requests bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants