diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-20 02:49:34 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-20 03:09:22 +0900 |
| commit | 7d06a493514c20338278c8ffdf0ba2e0f0eed353 (patch) | |
| tree | 71a8733e86162101294ab9f1b446971e391a52f3 /crates/shirabe/src/command/init_command.rs | |
| parent | f5005fccce818e5d2f33612a4cda90aad7469261 (diff) | |
| download | php-shirabe-7d06a493514c20338278c8ffdf0ba2e0f0eed353.tar.gz php-shirabe-7d06a493514c20338278c8ffdf0ba2e0f0eed353.tar.zst php-shirabe-7d06a493514c20338278c8ffdf0ba2e0f0eed353.zip | |
feat(init): implement repos/repositorySets accessors
Add the repos and repositorySets fields backing PackageDiscoveryTrait,
mirroring RequireCommand, and return them from get_repos_mut /
get_repository_sets_mut.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/init_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/init_command.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/shirabe/src/command/init_command.rs b/crates/shirabe/src/command/init_command.rs index afb4e9d..f345d76 100644 --- a/crates/shirabe/src/command/init_command.rs +++ b/crates/shirabe/src/command/init_command.rs @@ -49,18 +49,21 @@ pub struct InitCommand { /// @var array<string, string> git_config: Option<IndexMap<String, String>>, + repos: Option<crate::repository::RepositoryInterfaceHandle>, + repository_sets: + IndexMap<String, std::rc::Rc<std::cell::RefCell<crate::repository::RepositorySet>>>, } impl PackageDiscoveryTrait for InitCommand { fn get_repos_mut(&mut self) -> &mut Option<crate::repository::RepositoryInterfaceHandle> { - todo!() + &mut self.repos } fn get_repository_sets_mut( &mut self, ) -> &mut IndexMap<String, std::rc::Rc<std::cell::RefCell<crate::repository::RepositorySet>>> { - todo!() + &mut self.repository_sets } fn get_io(&self) -> std::rc::Rc<std::cell::RefCell<dyn IOInterface>> { @@ -104,6 +107,8 @@ impl InitCommand { let mut command = InitCommand { base_command_data: BaseCommandData::new(None), git_config: None, + repos: None, + repository_sets: IndexMap::new(), }; command .configure() |
