Use subcommand-specific repository config paths
Dependencies
- [2]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [3]
L4JXJHWXpijul/*: reorganize imports and remove extern crate - [4]
Q45QHPO4Feedback on network stuff - [5]
ZHABNS3SCanonicalize all paths - [6]
3KRGVQFUDo not update the mtime of unmodified files - [7]
QMTANHVNReset: only output changed files - [8]
XA23FMQMReset only files that have been modified - [9]
LGEJSLTYFixing output (including its uses in reset and pull) - [10]
W5HHTRPKRename the `mv` command to `move` - [11]
LBVUI6AXRename `ls` command to `list` - [12]
QL6K2ZM3Tags - [13]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [14]
RUBBHYZ7Removing unnecessary async/await - [15]
VGBH3ED6The Git feature does not need to be async - [16]
IVLLXQ5ZImproved push/pull reporting - [17]
OU6JOR3CAdd path filtering for log, add json output for log - [18]
6F6AAHK4Simplifying pijul::commands::log, and fixing Broken Pipe errors - [19]
S4LQTDJIavoid outputting repo multiple times in channel switch - [20]
4KJ45IJLImplement new identity management - [21]
4OJWMSOWFully replace crate::Identity - [22]
VWJ2JL63Adding a `pijul dependents` command to list the transitive closure of the reverse dependency relation - [23]
LZOGKBJXnew command `pijul client` for authenticating to a HTTP server - [24]
Y6TBQN7MAutomatically format `pijul` crate - [25]
ABQDWHNGMigrate from `pijul::repository` to `pijul-repository` - [26]
N26HD5PFReplace `chrono` with `jiff` - [27]
56KJGRVORemove `atty` dependency - [28]
SCUBUHIARemove `lazy_static` dependency - [29]
IBLJI7IA✨ Add `pijul status` subcommand - [30]
YQJRT2UB✨ Add current channel to pijul status output - [31]
67GIAQEUHandle named remotes in pijul remote and remote delete - [32]
3FNRS6MWRefactor log command's handling of repo and channel - [33]
K34KD3FTRefactor fork command's handling of repo and channel - [34]
U45JUYYGRefactor change command's handling of repo and channel - [35]
Z4PPQZUGRefactor `pijul-config` to support layered configuration - [36]
YW6NICQVMigrate codebase to refactored `pijul_config` crate - [37]
HM6QW3CYHandle missing configurations in `pijul_config` - [38]
2ZKE4XMJReplace `pijul_repository::init_dot_ignore` with `pijul_config::Config::dot_ignore_contents` - [39]
OWO4EWK7Add global `--config` argument to override configuration values - [40]
PIQCNEEBUpgrading to Clap 3.0.0-alpha.5 - [41]
KKNMDXAITweak identity subcommand - [42]
X243Z3Y5Recording only the required metadata (can even be changed later!) - [43]
OQQ4TGEMPrinting modifications only once in pijul diff - [44]
QQS7LII4Add value hints to arguments - [45]
I24UEJQLVarious post-fire fixes - [46]
Y7YAFMFFFix path prefix striping on Windows. - [47]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [48]
6YOM7WMHRefactor credit command's handling of repo and channel - [49]
ZSFJT4SFAllow remotes to have a different push and pull address - [50]
KWAGWB73Adding extra dependencies from the config file - [51]
GKSVBEUWRefactor Repository constructors to take Option<&Path> instead of Option<PathBuf> - [52]
CQKIS7KR♻️ Refactor status command's handling of repo and channel - [53]
OGJFEWHUFixing missing dependencies on partial clones - [54]
FVQYZQFLCreate dialoguer themes based on global config - [55]
LYTVEPH3Avoid cloning into an existing path - [56]
HGJETVANCreate `pijul_config::global_config_directory()` - [57]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [58]
JN34NIMJMore specific error for unrecognized subcommands
Change contents
- replacement in pijul-config/src/lib.rs at line 21
use log::warn;use log::{info, warn}; - replacement in pijul-config/src/lib.rs at line 70
repository_path: &Path,repository_path: Option<&Path>, - edit in pijul-config/src/lib.rs at line 73
let local_config_path = Local::config_file(&repository_path); - replacement in pijul-config/src/lib.rs at line 114
let local_config = match Local::read_contents(&local_config_path) {Ok(contents) => {// Parse the config (and make sure it's valid!)let local_config = Local::parse_contents(&local_config_path, &contents)?;// Add the configuration layer as a stringlayers = layers.merge(Toml::string(&contents));let local_config = match repository_path {Some(repository_path) => match Local::read_contents(&repository_path) {Ok(contents) => {// Parse the config (and make sure it's valid!)let local_config = Local::parse_contents(&repository_path, &contents)?;// Add the configuration layer as a stringlayers = layers.merge(Toml::string(&contents)); - replacement in pijul-config/src/lib.rs at line 122
Some(local_config)}Err(error) => {warn!("Unable to read local config file: {error:#?}");Some(local_config)}Err(error) => {warn!("Unable to read global config file: {error:#?}");None}},None => {info!("Skipping local configuration path - repository path was not supplied by caller"); - replacement in pijul/src/main.rs at line 221
let repository_path = std::env::current_dir()?;let config = Config::load(&repository_path, opts.config)?;let repository_path = match &opts.subcmd {SubCommand::Log(log) => log.repository_path(),SubCommand::Init(init) => init.repository_path(),SubCommand::Clone(clone) => clone.repository_path(),SubCommand::Record(record) => record.repository_path(),SubCommand::Diff(diff) => diff.repository_path(),SubCommand::Status(status) => status.repository_path(),SubCommand::Push(push) => push.repository_path(),SubCommand::Pull(pull) => pull.repository_path(),SubCommand::Change(change) => change.repository_path(),SubCommand::Dependents(deps) => deps.repository_path(),SubCommand::Channel(channel) => channel.repository_path(),SubCommand::Protocol(protocol) => protocol.repository_path(),#[cfg(feature = "git")]SubCommand::Git(git) => git.repository_path(),SubCommand::Move(move_cmd) => move_cmd.repository_path(),SubCommand::List(list) => list.repository_path(),SubCommand::Add(add) => add.repository_path(),SubCommand::Remove(remove) => remove.repository_path(),SubCommand::Reset(reset) => reset.repository_path(),SubCommand::Debug(debug) => debug.repository_path(),SubCommand::Fork(fork) => fork.repository_path(),SubCommand::Unrecord(unrecord) => unrecord.repository_path(),SubCommand::Apply(apply) => apply.repository_path(),SubCommand::Remote(remote) => remote.repository_path(),SubCommand::Archive(archive) => archive.repository_path(),SubCommand::Credit(credit) => credit.repository_path(),SubCommand::Tag(tag) => tag.repository_path(),SubCommand::Identity(identity) => identity.repository_path(),SubCommand::Client(client) => client.repository_path(),SubCommand::ExternalSubcommand(_) | SubCommand::Completion(_) => None,};let config = Config::load(repository_path, opts.config)?; - edit in pijul/src/commands/unrecord.rs at line 11
use std::path::Path; - edit in pijul/src/commands/unrecord.rs at line 33
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/tag.rs at line 2
use std::path::Path; - edit in pijul/src/commands/tag.rs at line 77
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - replacement in pijul/src/commands/status.rs at line 5
use std::path::PathBuf;use std::path::{Path, PathBuf}; - edit in pijul/src/commands/status.rs at line 27
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - replacement in pijul/src/commands/reset.rs at line 2[7.42]→[3.1289:1313](∅→∅),[19.43]→[3.1289:1313](∅→∅),[9.223]→[3.1289:1313](∅→∅),[6.588]→[3.1289:1313](∅→∅),[2.97650]→[3.1289:1313](∅→∅)
use std::path::PathBuf;use std::path::{Path, PathBuf}; - edit in pijul/src/commands/reset.rs at line 35
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - replacement in pijul/src/commands/record.rs at line 2
use std::path::PathBuf;use std::path::{Path, PathBuf}; - edit in pijul/src/commands/record.rs at line 63
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/pushpull.rs at line 4
use std::path::Path; - edit in pijul/src/commands/pushpull.rs at line 186
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/pushpull.rs at line 509
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/pushpull.rs at line 696
}pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path() - replacement in pijul/src/commands/protocol.rs at line 4
use std::path::PathBuf;use std::path::{Path, PathBuf}; - edit in pijul/src/commands/protocol.rs at line 51
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - replacement in pijul/src/commands/log.rs at line 60
let repo = Repository::find_root(cmd.base.repo_path())?;let repo = Repository::find_root(cmd.repository_path())?; - edit in pijul/src/commands/log.rs at line 498
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - replacement in pijul/src/commands/init.rs at line 1
use std::path::PathBuf;use std::path::{Path, PathBuf}; - edit in pijul/src/commands/init.rs at line 24
pub fn repository_path(&self) -> Option<&Path> {None} - edit in pijul/src/commands/identity.rs at line 1
use crate::commands::common_opts::RepoPath; - edit in pijul/src/commands/identity.rs at line 8
use std::path::Path; - replacement in pijul/src/commands/identity.rs at line 184
#[derive(Clone, Parser, Debug)]#[derive(Parser, Debug)] - edit in pijul/src/commands/identity.rs at line 188
#[clap(flatten)]repository_path: RepoPath, - edit in pijul/src/commands/identity.rs at line 242
pub fn repository_path(&self) -> Option<&Path> {self.repository_path.repo_path()} - edit in pijul/src/commands/git.rs at line 45
pub fn repository_path(&self) -> Option<&Path> {self.pijul_path.as_deref()} - edit in pijul/src/commands/fork.rs at line 1
use std::path::Path; - edit in pijul/src/commands/fork.rs at line 28
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/file_operations.rs at line 28
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/file_operations.rs at line 102
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/file_operations.rs at line 141
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/file_operations.rs at line 228
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - replacement in pijul/src/commands/diff.rs at line 3
use std::path::PathBuf;use std::path::{Path, PathBuf}; - edit in pijul/src/commands/diff.rs at line 42
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/dependents.rs at line 4
use std::path::Path; - edit in pijul/src/commands/dependents.rs at line 20
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/debug.rs at line 7
use std::path::Path; - edit in pijul/src/commands/debug.rs at line 19
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - replacement in pijul/src/commands/credit.rs at line 2
use std::path::PathBuf;use std::path::{Path, PathBuf}; - edit in pijul/src/commands/credit.rs at line 25
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - replacement in pijul/src/commands/clone.rs at line 1
use std::path::PathBuf;use std::path::{Path, PathBuf}; - edit in pijul/src/commands/clone.rs at line 37
pub fn repository_path(&self) -> Option<&Path> {None} - edit in pijul/src/commands/client.rs at line 7
use std::path::Path; - edit in pijul/src/commands/client.rs at line 19
pub fn repository_path(&self) -> Option<&Path> {None} - edit in pijul/src/commands/channel.rs at line 2
use std::path::Path; - edit in pijul/src/commands/channel.rs at line 56
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/change.rs at line 1
use std::path::Path; - edit in pijul/src/commands/change.rs at line 22
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - edit in pijul/src/commands/archive.rs at line 5
use std::path::Path; - edit in pijul/src/commands/archive.rs at line 41
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()} - replacement in pijul/src/commands/apply.rs at line 1
use std::path::PathBuf;use std::path::{Path, PathBuf}; - edit in pijul/src/commands/apply.rs at line 27
pub fn repository_path(&self) -> Option<&Path> {self.base.repo_path()}