Merge pull request #49 from fluxcd/gitrepository-panic
This commit is contained in:
commit
f2bff9053d
|
@ -321,7 +321,7 @@ func (r *GitRepositoryReconciler) sync(ctx context.Context, repository sourcev1.
|
|||
|
||||
if revision == "" {
|
||||
revision = fmt.Sprintf("%s/%s", branch, ref.Hash().String())
|
||||
if repository.Spec.Reference.Tag != "" {
|
||||
if repository.Spec.Reference != nil && repository.Spec.Reference.Tag != "" {
|
||||
revision = fmt.Sprintf("%s/%s", repository.Spec.Reference.Tag, ref.Hash().String())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue