Add and preserve the marketplace auto-update setting (#61286)

## What changed

- Add `marketplaces.<name>.auto_update` to the configuration type and schema, defaulting to `false`.
- Preserve `auto_update` when re-adding a marketplace with the same source type and source, including equivalent normalized local paths. Drop it when the source changes.
- Preserve existing marketplace entries when converting an inline `marketplaces` table for editing.

## Testing

Add regression tests for re-adding the same Git source, replacing it with another source, and re-adding an equivalent local path.

GitOrigin-RevId: 8a4108f1c8fc5a20a8564ead5baeef57e7ccfa19
This commit is contained in:
smurching-oai
2026-11-13 08:25:41 +00:00
committed by copyberry
parent c899e21cda
commit 69231e119b
4 changed files with 93 additions and 3 deletions
@@ -225,12 +225,11 @@ fn parse_configured_git_marketplace(
.try_into::<MarketplaceConfig>()
.map_err(|err| format!("invalid configured Git marketplace: {err}"))?;
let MarketplaceConfig {
last_updated: _,
last_revision: _,
source_type,
source,
ref_name,
sparse_paths,
..
} = marketplace;
if source_type != Some(MarketplaceSourceType::Git) {
return Ok(None);