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> |
||
|---|---|---|
| .. | ||
| checkout.go | ||
| checkout_test.go | ||
| commit.go | ||
| transport.go | ||
| transport_test.go | ||