Since per-repo config may contain CLI settings, it must be visible to CLI. Therefore, UserSettings::with_repo() -> RepoSettings isn't used, and its implementation is nullified by this commit. #616
Showing the changes to lib/src (1 of 8 files). Show all
Unified · Split
| @@ -61,15 +61,10 @@ impl UserSettings { · 60 unmodified lines | ||
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | − pub fn with_repo(&self, repo_path: &Path) -> Result<RepoSettings, config::ConfigError> { | |
| 65 | − let config = config::Config::builder() | |
| 66 | − .add_source(self.config.clone()) | |
| 67 | − .add_source( | |
| 68 | − config::File::from(repo_path.join("config")) | |
| 69 | − .required(false) | |
| 70 | − .format(config::FileFormat::Toml), | |
| 71 | − ) | |
| 72 | − .build()?; | |
| 64 | + // TODO: Reconsider UserSettings/RepoSettings abstraction. See | |
| 65 | + // https://github.com/martinvonz/jj/issues/616#issuecomment-1345170699 | |
| 66 | + pub fn with_repo(&self, _repo_path: &Path) -> Result<RepoSettings, config::ConfigError> { | |
| 67 | + let config = self.config.clone(); | |
| 73 | 68 | Ok(RepoSettings { _config: config }) |
| 74 | 69 | } |
| 75 | 70 | |