Skip to content

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 requested review from darkowlzz and hiddeco May 31, 2022 18:01
@aryan9600 aryan9600 force-pushed the fix-checkout-branch branch from f6a2024 to 775c3cd Compare May 31, 2022 19:33
@aryan9600 aryan9600 force-pushed the fix-checkout-branch branch from 775c3cd to 107ca31 Compare May 31, 2022 22:05
@aryan9600 aryan9600 added area/git Git related issues and pull requests bug Something isn't working labels May 31, 2022
@aryan9600 aryan9600 force-pushed the fix-checkout-branch branch from 107ca31 to 601aa0f Compare May 31, 2022 23:14
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]>
@aryan9600 aryan9600 force-pushed the fix-checkout-branch branch from 601aa0f to ae27f9e Compare June 1, 2022 08:44
@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