Skip to content

Commit 25135f9

Browse files
committed
Work around for using revision but no branch
See fluxcd/source-controller#315. Signed-off-by: Michael Bridgen <mikeb@squaremobius.net>
1 parent 6754508 commit 25135f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

assemblage/controllers/assemblage_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ func gitRepositorySpecFromSync(sync *fleetv1.Sync) (sourcev1.GitRepositorySpec,
101101
if tag := srcSpec.Version.Tag; tag != "" {
102102
ref.Tag = tag
103103
} else if rev := srcSpec.Version.Revision; rev != "" {
104+
ref.Branch = "main" // FIXME a hack to make it work with my repos, see https://github.com/fluxcd/source-controller/issues/315
104105
ref.Commit = rev
105106
} else {
106107
return dstSpec, fmt.Errorf("neither tag nor revision given in git source spec")

0 commit comments

Comments
 (0)