source-controller/pkg/git
Hidde Beydals b7376ce94c gogit: allow checkout of commit without branch
This commit changes the `gogit` behavior for commit checkouts,
now allowing one to reference to just a commit while omitting any
branch reference. Doing this creates an Artifact with a
`HEAD/<commit>` revision.

If both a `branch` and `commit` are defined, the commit is expected
to exist within the branch. This results in a more efficient clone
of just the target branch, and also makes this change backwards
compatible.

Fixes #407
Fixes #315

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-10-27 00:43:31 +05:30
..
gogit gogit: allow checkout of commit without branch 2021-10-27 00:43:31 +05:30
libgit2 gogit: allow checkout of commit without branch 2021-10-27 00:43:31 +05:30
strategy gogit: allow checkout of commit without branch 2021-10-27 00:43:31 +05:30
git.go gogit: allow checkout of commit without branch 2021-10-27 00:43:31 +05:30
git_test.go git: standardise commit and (PGP) verification 2021-10-27 00:43:31 +05:30
options.go gogit: allow checkout of commit without branch 2021-10-27 00:43:31 +05:30
options_test.go git: refactor AuthStrategy into AuthOptions 2021-10-27 00:43:31 +05:30