source-controller/pkg/git
Blake Burkhart 0df2b0e0f0 Fix tag checkout with libgit2
SetHeadDetached (git_repository_set_head_detached) only changes HEAD,
and does not actually checkout the files on disk. Use CheckoutHead with
the CheckoutForce Strategy to actually check the files out on disk.

Additionally add a test that validates the hash of a checked out file's
contents.

Previously, the hash of the desired tag was being reported as the
checked out revision by the GitRepository. However the wrong files were
checked out and an incorrect revision would be deployed by Flux.

Signed-off-by: Blake Burkhart <blake.burkhart@us.af.mil>
2021-06-28 20:03:11 -05:00
..
gogit Update go-git to v5.4.1 2021-05-26 14:06:41 +03:00
libgit2 Fix tag checkout with libgit2 2021-06-28 20:03:11 -05:00
strategy Add support for Git submodules with go-git 2021-03-30 13:00:13 +03:00
git.go Add support for Git submodules with go-git 2021-03-30 13:00:13 +03:00