Skip to content

Commit

Permalink
Clarify the revision's default value in the API (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
nan-yu authored Nov 20, 2023
1 parent 6c1140a commit cb6d774
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
10 changes: 8 additions & 2 deletions manifests/reposync-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ spec:
type: string
revision:
description: revision is the git revision (branch, tag, ref or
commit) to fetch. Revision defaults to 'branch'.
commit) to fetch. If 'revision' is not specified, it defaults
to the HEAD of the branch that is specified in the 'branch'
field. If neither 'revision' nor 'branch' is specified, it defaults
to the HEAD of the 'master' branch.
type: string
secretRef:
description: secretRef is the secret used to connect to the Git
Expand Down Expand Up @@ -1191,7 +1194,10 @@ spec:
type: string
revision:
description: revision is the git revision (branch, tag, ref or
commit) to fetch. Revision defaults to 'branch'.
commit) to fetch. If 'revision' is not specified, it defaults
to the HEAD of the branch that is specified in the 'branch'
field. If neither 'revision' nor 'branch' is specified, it defaults
to the HEAD of the 'master' branch.
type: string
secretRef:
description: secretRef is the secret used to connect to the Git
Expand Down
10 changes: 8 additions & 2 deletions manifests/rootsync-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ spec:
type: string
revision:
description: revision is the git revision (branch, tag, ref or
commit) to fetch. Revision defaults to 'branch'.
commit) to fetch. If 'revision' is not specified, it defaults
to the HEAD of the branch that is specified in the 'branch'
field. If neither 'revision' nor 'branch' is specified, it defaults
to the HEAD of the 'master' branch.
type: string
secretRef:
description: secretRef is the secret used to connect to the Git
Expand Down Expand Up @@ -1246,7 +1249,10 @@ spec:
type: string
revision:
description: revision is the git revision (branch, tag, ref or
commit) to fetch. Revision defaults to 'branch'.
commit) to fetch. If 'revision' is not specified, it defaults
to the HEAD of the branch that is specified in the 'branch'
field. If neither 'revision' nor 'branch' is specified, it defaults
to the HEAD of the 'master' branch.
type: string
secretRef:
description: secretRef is the secret used to connect to the Git
Expand Down
5 changes: 4 additions & 1 deletion pkg/api/configsync/v1alpha1/gitconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ type Git struct {
Branch string `json:"branch,omitempty"`

// revision is the git revision (branch, tag, ref or commit) to fetch.
// Revision defaults to 'branch'.
// If 'revision' is not specified, it defaults to the HEAD of the branch that
// is specified in the 'branch' field.
// If neither 'revision' nor 'branch' is specified, it defaults to the HEAD of
// the 'master' branch.
// +optional
Revision string `json:"revision,omitempty"`

Expand Down
5 changes: 4 additions & 1 deletion pkg/api/configsync/v1beta1/gitconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ type Git struct {
Branch string `json:"branch,omitempty"`

// revision is the git revision (branch, tag, ref or commit) to fetch.
// Revision defaults to 'branch'.
// If 'revision' is not specified, it defaults to the HEAD of the branch that
// is specified in the 'branch' field.
// If neither 'revision' nor 'branch' is specified, it defaults to the HEAD of
// the 'master' branch.
// +optional
Revision string `json:"revision,omitempty"`

Expand Down

0 comments on commit cb6d774

Please sign in to comment.