Skip to content

Commit 39d28f7

Browse files
committed
docs: clarify that .spec.ignore extends defaults rather than overriding
Both the v1 API godoc and the v1 spec docs say that .spec.ignore 'overrides' the default exclusion list, but the controller appends spec.ignore to the default sourceignore patterns rather than replacing them (see e.g. internal/controller/gitrepository_controller.go:887, ocirepository_controller.go:1163, bucket_controller.go:708). Setting spec.ignore: '.git/' therefore still drops the rest of the default exclusions (.gitignore, .gitmodules, .gitattributes), which is 'extend' semantics, not 'override'. Update the API godoc comments, regenerated docs/api/v1/source.md, and the prose in docs/spec/v1/{gitrepositories,buckets,ocirepositories}.md to say 'extends' instead of 'overrides'. No behaviour change. Fixes #429 Signed-off-by: alliasgher <alliasgher123@gmail.com>
1 parent 73644f6 commit 39d28f7

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

api/v1/bucket_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ type BucketSpec struct {
140140
// +optional
141141
Timeout *metav1.Duration `json:"timeout,omitempty"`
142142

143-
// Ignore overrides the set of excluded patterns in the .sourceignore format
143+
// Ignore extends the set of excluded patterns in the .sourceignore format
144144
// (which is the same as .gitignore). If not provided, a default will be used,
145145
// consult the documentation for your version to find out what those are.
146146
// +optional

api/v1/gitrepository_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ type GitRepositorySpec struct {
138138
// +optional
139139
ProxySecretRef *meta.LocalObjectReference `json:"proxySecretRef,omitempty"`
140140

141-
// Ignore overrides the set of excluded patterns in the .sourceignore format
141+
// Ignore extends the set of excluded patterns in the .sourceignore format
142142
// (which is the same as .gitignore). If not provided, a default will be used,
143143
// consult the documentation for your version to find out what those are.
144144
// +optional

api/v1/ocirepository_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ type OCIRepositorySpec struct {
131131
// +optional
132132
Timeout *metav1.Duration `json:"timeout,omitempty"`
133133

134-
// Ignore overrides the set of excluded patterns in the .sourceignore format
134+
// Ignore extends the set of excluded patterns in the .sourceignore format
135135
// (which is the same as .gitignore). If not provided, a default will be used,
136136
// consult the documentation for your version to find out what those are.
137137
// +optional

docs/api/v1/source.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ string
274274
</td>
275275
<td>
276276
<em>(Optional)</em>
277-
<p>Ignore overrides the set of excluded patterns in the .sourceignore format
277+
<p>Ignore extends the set of excluded patterns in the .sourceignore format
278278
(which is the same as .gitignore). If not provided, a default will be used,
279279
consult the documentation for your version to find out what those are.</p>
280280
</td>
@@ -507,7 +507,7 @@ string
507507
</td>
508508
<td>
509509
<em>(Optional)</em>
510-
<p>Ignore overrides the set of excluded patterns in the .sourceignore format
510+
<p>Ignore extends the set of excluded patterns in the .sourceignore format
511511
(which is the same as .gitignore). If not provided, a default will be used,
512512
consult the documentation for your version to find out what those are.</p>
513513
</td>
@@ -1279,7 +1279,7 @@ string
12791279
</td>
12801280
<td>
12811281
<em>(Optional)</em>
1282-
<p>Ignore overrides the set of excluded patterns in the .sourceignore format
1282+
<p>Ignore extends the set of excluded patterns in the .sourceignore format
12831283
(which is the same as .gitignore). If not provided, a default will be used,
12841284
consult the documentation for your version to find out what those are.</p>
12851285
</td>
@@ -1631,7 +1631,7 @@ string
16311631
</td>
16321632
<td>
16331633
<em>(Optional)</em>
1634-
<p>Ignore overrides the set of excluded patterns in the .sourceignore format
1634+
<p>Ignore extends the set of excluded patterns in the .sourceignore format
16351635
(which is the same as .gitignore). If not provided, a default will be used,
16361636
consult the documentation for your version to find out what those are.</p>
16371637
</td>
@@ -2220,7 +2220,7 @@ string
22202220
</td>
22212221
<td>
22222222
<em>(Optional)</em>
2223-
<p>Ignore overrides the set of excluded patterns in the .sourceignore format
2223+
<p>Ignore extends the set of excluded patterns in the .sourceignore format
22242224
(which is the same as .gitignore). If not provided, a default will be used,
22252225
consult the documentation for your version to find out what those are.</p>
22262226
</td>
@@ -3451,7 +3451,7 @@ string
34513451
</td>
34523452
<td>
34533453
<em>(Optional)</em>
3454-
<p>Ignore overrides the set of excluded patterns in the .sourceignore format
3454+
<p>Ignore extends the set of excluded patterns in the .sourceignore format
34553455
(which is the same as .gitignore). If not provided, a default will be used,
34563456
consult the documentation for your version to find out what those are.</p>
34573457
</td>

docs/spec/v1/buckets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ as a more efficient way of excluding files.
10221022
pattern format](https://git-scm.com/docs/gitignore#_pattern_format). Storage
10231023
objects which keys match the defined rules are excluded while fetching.
10241024

1025-
When specified, `.spec.ignore` overrides the [default exclusion
1025+
When specified, `.spec.ignore` extends the [default exclusion
10261026
list](#default-exclusions), and may overrule the [`.sourceignore` file
10271027
exclusions](#sourceignore-file). See [excluding files](#excluding-files)
10281028
for more information.

docs/spec/v1/gitrepositories.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ kubectl create secret generic pgp-public-keys \
701701
pattern format](https://git-scm.com/docs/gitignore#_pattern_format). Paths
702702
matching the defined rules are excluded while archiving.
703703

704-
When specified, `.spec.ignore` overrides the [default exclusion
704+
When specified, `.spec.ignore` extends the [default exclusion
705705
list](#default-exclusions), and may overrule the [`.sourceignore` file
706706
exclusions](#sourceignore-file). See [excluding files](#excluding-files)
707707
for more information.
@@ -851,7 +851,7 @@ placed in the repository root or in subdirectories.
851851
#### Ignore spec
852852

853853
Another option is to define the exclusions within the GitRepository spec, using
854-
the [`.spec.ignore` field](#ignore). Specified rules override the [default
854+
the [`.spec.ignore` field](#ignore). Specified rules extend the [default
855855
exclusion list](#default-exclusions), and may overrule `.sourceignore` file
856856
exclusions.
857857

docs/spec/v1/ocirepositories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ keeping the original content unaltered.
538538
pattern format](https://git-scm.com/docs/gitignore#_pattern_format). Paths
539539
matching the defined rules are excluded while archiving.
540540

541-
When specified, `.spec.ignore` overrides the [default exclusion
541+
When specified, `.spec.ignore` extends the [default exclusion
542542
list](#default-exclusions), and may overrule the [`.sourceignore` file
543543
exclusions](#sourceignore-file). See [excluding files](#excluding-files)
544544
for more information.

0 commit comments

Comments
 (0)