-
Notifications
You must be signed in to change notification settings - Fork 187
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
gogit: Add new ForceGoGitImplementation FeatureGate #945
Conversation
48b5b85
to
5f02724
Compare
9a9fa2c
to
d5872c2
Compare
if enabled, _ := r.features[features.ForceGoGitImplementation]; enabled { | ||
gitImplementation = sourcev1.GoGitImplementation | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is done multiple times, I am wondering if it might be better to factor this out into a helper function which takes the object and string map and returns the correct implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@darkowlzz gave a similar feedback on this and suggested the output of the feature gate to be passed as parameter to gitCheckout
, which aligns with the current implementation for optimized clones. PTAL
d5872c2
to
3748d2d
Compare
3748d2d
to
84f4fc4
Compare
84f4fc4
to
1a9724b
Compare
Signed-off-by: Paulo Gomes <[email protected]>
af226fa
to
4f323e9
Compare
ForceGoGitImplementation ignores the value set for gitImplementation and ensures that go-git is used for all GitRepository objects. This can be used to confirm that Flux instances won't break if/when the libgit2 implementation was to be deprecated. When enabled, libgit2 won't be initialized, nor will any git2go cgo code be called. Signed-off-by: Paulo Gomes <[email protected]>
Signed-off-by: Paulo Gomes <[email protected]>
4f323e9
to
bdcf708
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
ForceGoGitImplementation
ignores the value set forgitImplementation
and ensures that go-git is used for allGitRepository
objects. When enabled, libgit2 won't be initialized, nor will any git2go cgo code be called.This is a soft-decommissioning of
libgit2
, to confirm that Flux instances won't break when that implementation is deprecated.