♻️ Refactor status command's handling of repo and channel

berkus
Jun 24, 2025, 3:40 PM
CQKIS7KRVEYMB2W2JBYPKEHS6TSOOUFG2TWOBS6XEXBTOAQ5HYHAC

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
    [2.189][2.190:221]()
    use clap::{Parser, ValueHint};
    [2.189]
    [3.0]
    use clap::Parser;
  • edit in pijul/src/commands/status.rs at line 7
    [2.246]
    [2.246]
    use crate::commands::common_opts::RepoAndChannel;
  • replacement in pijul/src/commands/status.rs at line 11
    [2.291][2.291:641]()
    /// 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>,
    [2.291]
    [2.641]
    #[clap(flatten)]
    pub base: RepoAndChannel,
  • replacement in pijul/src/commands/status.rs at line 28
    [2.1238][3.75:142]()
    let repo = Repository::find_root(self.repo_path.clone())?;
    [2.1238]
    [3.142]
    let repo = Repository::find_root(self.base.repo_path())?;
  • replacement in pijul/src/commands/status.rs at line 41
    [2.1317][2.1317:1356]()
    repo_path: self.repo_path,
    [2.1317]
    [2.1356]
    base: self.base,
  • edit in pijul/src/commands/status.rs at line 43
    [2.1381][2.1381:1416]()
    channel: self.channel,