The new feature gate enables users to toggle the download of all branch
head references when push branches are configured.
Tests were refactored to ensure that they are feature gate sensitive.
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
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 <paulo.gomes@weave.works>
Automations using a different push branch can now
enable force push to ensure that it gets refreshed
with the latest version of the branch used for the
clone operation.
Initially this was going to be added in combination
with Shallow clones for the `go-git` implementation.
However, force push is required for feature completeness
whilst Shallow clones are mostly an optimisation, and
will therefore be implemented at a later stage.
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
GitManagedTransport enables the use of Managed Transport. This replaces
the previous 'EXPERIMENTAL_GIT_TRANSPORT' environment variable that was
used for the same result. This commit also enables it by default.
This is an opt-out feature, which can be disabled by starting the
controller with the argument '--feature-gates=GitManagedTransport=false'.
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>