Refactor dependents command's handling of repo and channel
Dependencies
- [2]
MYB5C3FPSolving conflicts - [3]
GKSVBEUWRefactor Repository constructors to take Option<&Path> instead of Option<PathBuf> - [4]
Y2Y4OOIEMove `pijul::DEFAULT_CHANNEL` to `libpijul` - [5]
ABQDWHNGMigrate from `pijul::repository` to `pijul-repository` - [6]
QQS7LII4Add value hints to arguments - [7]
STOFOQI4Fixing a bug in `pijul dependents` where non-dependents could be listed (and making the command deterministic) - [8]
QWIYNMI5Formatting + big-endian Sanakirja - [9]
VWJ2JL63Adding a `pijul dependents` command to list the transitive closure of the reverse dependency relation - [10]
Y6TBQN7MAutomatically format `pijul` crate
Change contents
- replacement in pijul/src/commands/dependents.rs at line 1
use clap::{Parser, ValueHint};use clap::Parser; - edit in pijul/src/commands/dependents.rs at line 4
use std::path::PathBuf; - edit in pijul/src/commands/dependents.rs at line 5
use crate::commands::common_opts::RepoPath;use crate::commands::get_channel; - replacement in pijul/src/commands/dependents.rs at line 11[4.400]→[4.400:468](∅→∅),[4.468]→[4.1991:2078](∅→∅),[4.2078]→[4.522:554](∅→∅),[4.522]→[4.522:554](∅→∅)
/// Use the repository at PATH instead of the current directory#[clap(long = "repository", value_name = "PATH", value_hint = ValueHint::DirPath)]repo_path: Option<PathBuf>,#[clap(flatten)]base: RepoPath, - replacement in pijul/src/commands/dependents.rs at line 20
let repo = Repository::find_root(self.repo_path.as_deref())?;let repo = Repository::find_root(self.base.repo_path())?; - replacement in pijul/src/commands/dependents.rs at line 22
let channel_name = txn.current_channel().unwrap_or(libpijul::DEFAULT_CHANNEL);let channel = if let Some(channel) = txn.load_channel(&channel_name)? {channel} else {let (channel_name, _) = get_channel(None, &txn);let Some(channel) = txn.load_channel(&channel_name)? else { - edit in pijul/src/commands/dependents.rs at line 27