repo: add source repo root index command and fast TSV index loading

- add `depot repo index [DIR] [--subdir ...]` to generate `depot-index.tsv`
- use deterministic, git-friendly TSV format with package/provides rows
- teach source lookup to prefer repo index files and fall back to TOML scanning
- add index generation/loading/fallback tests
- document new command in README
This commit is contained in:
2026-02-28 15:04:24 -06:00
parent 421ca362ac
commit 1f22d22887
4 changed files with 468 additions and 54 deletions
+9
View File
@@ -142,6 +142,15 @@ pub enum RepoCommands {
/// Update only one source repo by name
name: Option<String>,
},
/// Create/update a source index at the root of a source repo
Index {
/// Source repository root directory
#[arg(default_value = ".")]
dir: PathBuf,
/// Optional subdirectory to scan (repeatable, e.g. --subdir core --subdir extra)
#[arg(long = "subdir")]
subdirs: Vec<String>,
},
/// List configured source and binary repos
List,
/// Add or update a repo entry in /etc/depot.d/repos.toml