cli: Add --from and other options to rad seed

Gives the same options to `rad seed` as `rad sync --fetch`.

Allows seeding and syncing from specific seeds in one command:

  rad seed <rid> --from <nid>

Useful for seeding private repos on public nodes.
This commit is contained in:
cloudhead
2024-06-25 12:01:52 +02:00
parent 765fc48c84
commit 9edb633d98
3 changed files with 48 additions and 3 deletions
+6
View File
@@ -39,6 +39,12 @@ impl SyncSettings {
self
}
/// Set seeds.
pub fn seeds(mut self, seeds: impl IntoIterator<Item = NodeId>) -> Self {
self.seeds = seeds.into_iter().collect();
self
}
/// Use profile to populate sync settings, by adding preferred seeds if no seeds are specified,
/// and removing the local node from the set.
pub fn with_profile(mut self, profile: &Profile) -> Self {