Commit bb10dcf
submodule: skip redundant active entries when pattern covers path
configure_added_submodule always writes an explicit
submodule.<name>.active entry, even when the new
path is already matched by submodule.active
patterns. This leads to unnecessary and cluttered configuration.
change the logic to centralize wildmatch-based pattern lookup,
in configure_added_submodule. Wrap the active-entry write in a conditional
that only fires when that helper reports no existing pattern covers the
submodule’s path.
Signed-off-by: K Jayatheerth <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 1fa06ce commit bb10dcf
2 files changed
+34
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
3329 | 3331 | | |
3330 | 3332 | | |
3331 | 3333 | | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
3332 | 3337 | | |
3333 | 3338 | | |
3334 | 3339 | | |
| |||
3370 | 3375 | | |
3371 | 3376 | | |
3372 | 3377 | | |
3373 | | - | |
| 3378 | + | |
| 3379 | + | |
3374 | 3380 | | |
3375 | 3381 | | |
3376 | 3382 | | |
3377 | 3383 | | |
3378 | | - | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
3379 | 3396 | | |
3380 | 3397 | | |
3381 | 3398 | | |
3382 | 3399 | | |
3383 | | - | |
3384 | | - | |
3385 | | - | |
3386 | | - | |
3387 | 3400 | | |
3388 | 3401 | | |
3389 | 3402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
127 | 142 | | |
0 commit comments