-
Notifications
You must be signed in to change notification settings - Fork 614
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
bug: go-git failed to checkout with tag and unstaged changes #5027
Comments
Also we did some diving into the code and found that if we use |
We did a
|
Describe the bug
To set the context, we have a flux cd setup
Since flux uses go-git, we are facing issue of
failed to checkout and determine revision: unable to checkout tag 'vX.X.X': worktree contains unstaged changes
We did a backtrack of where this issue is and found it in https://github.com/fluxcd/pkg/blob/ac1007b57e37838e73b8bc95365dab9a0e856e8e/git/gogit/clone.go#L382
We then isolated it and created our own program simulating the same, and were able to replicate the issue.It looks like that go-git is able to checkout the code but not able to go to that specific tag because it does a sort of
soft reset
ie. if we checkout 0.7.3 all the future commits to the branch move to the staging area and thus the former issue ofunstaged changes
We want to create a Helm Chart citing the latest release , but since it fails at this step, we arent able to proceed further
Steps to reproduce
Configure FluxCD for your environment
Expected behavior
Cloning is done with working tree clean
Screenshots and recordings
No response
OS / Distro
Ubuntu
Flux version
Latest
Flux check
NA
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: