♻️ Refactor status command's handling of repo and channel
Dependencies
- [2]
IBLJI7IA✨ Add `pijul status` subcommand - [3]
YQJRT2UB✨ Add current channel to pijul status output
Change contents
- replacement in pijul/src/commands/status.rs at line 1
use clap::{Parser, ValueHint};use clap::Parser; - edit in pijul/src/commands/status.rs at line 7
use crate::commands::common_opts::RepoAndChannel; - replacement in pijul/src/commands/status.rs at line 11
/// Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a `.pijul` directory.#[clap(long = "repository", value_hint = ValueHint::DirPath)]pub repo_path: Option<PathBuf>,/// Compare with this channel.#[clap(long = "channel")]pub channel: Option<String>,#[clap(flatten)]pub base: RepoAndChannel, - replacement in pijul/src/commands/status.rs at line 28
let repo = Repository::find_root(self.repo_path.clone())?;let repo = Repository::find_root(self.base.repo_path())?; - replacement in pijul/src/commands/status.rs at line 41
repo_path: self.repo_path,base: self.base, - edit in pijul/src/commands/status.rs at line 43
channel: self.channel,