source-controller/pkg/git does shallow clones when using the go-git
implementation, and apparently this causes problems when fetching a
branch that has been merged at the origin:
https://github.com/fluxcd/image-automation-controller/issues/164
So far as I can tell, getting a shallow clone breaks the automation,
no matter whether go-git or libgit2 is used for operations after
cloning. So: just use libgit2 for cloning, which means non-shallow
clones; and, for fetch and push, since there's no functional
difference between the implementations for those.
Signed-off-by: Michael Bridgen <michael@weave.works>
This commit adds a handful of tests to make sure errors in the
problematic formats are rewritten, and other errors are left alone.
I'm reluctant to test against the actual git providers, since that
would introduce a dependency on them. Thus, these tests won't guard
against the providers changing their messages.
Signed-off-by: Michael Bridgen <michael@weave.works>