file_operations: remove the counter-intuitive --repository options
Dependencies
- [2]
W5HHTRPKRename the `mv` command to `move` - [3]
A3RM526YIntegrating identity malleability - [4]
KWAMD2KRA few fixes in the documentation comments - [5]
Y7YAFMFFFix path prefix striping on Windows. - [6]
4H2XTVJ2Fix some mistakes in the docs - [7]
YN63NUZOSanakirja 1.0 - [8]
TZVUNELWDocumentation comments - [9]
3H6Q5LDSFixing a bug with the salt argument in `mv` - [10]
JL4WKA5PImplement the Sanakirja concurrency model in a cross-process way - [11]
EEOOHGQQMore atomic "file moves+transaction" - [12]
4OCC6D42Recursive add - [13]
PP3E3TREDo not move source if destination is wrong - [14]
ZBNKSYA6Fixing a bus error when starting a transaction on a full disk - [15]
AEPEFS7OWrite help for each argument - [16]
I24UEJQLVarious post-fire fixes - [17]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [18]
LBVUI6AXRename `ls` command to `list` - [19]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting).
Change contents
- edit in pijul/src/commands/file_operations.rs at line 14[2.96]→[4.2111:2261](∅→∅),[4.169248]→[4.2111:2261](∅→∅),[4.2261]→[4.169248:169313](∅→∅),[4.2581]→[4.169248:169313](∅→∅),[4.3663]→[4.169248:169313](∅→∅),[4.169248]→[4.169248:169313](∅→∅),[4.169313]→[4.32:33](∅→∅)
/// 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")]repo_path: Option<PathBuf>, - replacement in pijul/src/commands/file_operations.rs at line 25
let repo = Repository::find_root(self.repo_path.clone())?;let repo = Repository::find_root(None)?; - edit in pijul/src/commands/file_operations.rs at line 31
let to = path(&self.repo_path, to); - replacement in pijul/src/commands/file_operations.rs at line 44
let source = std::fs::canonicalize(&path(&self.repo_path, p.clone()))?;let target = if is_dir { to.join(p) } else { to.clone() };let source = std::fs::canonicalize(&p.clone())?;debug!("source = {:?}", source);let target = if is_dir {to.join(source.file_name().unwrap())} else {to.clone()}; - edit in pijul/src/commands/file_operations.rs at line 59
debug!("target = {:?}", target); - edit in pijul/src/commands/file_operations.rs at line 87
fn path(root: &Option<PathBuf>, path: PathBuf) -> PathBuf {if let Some(ref p) = root {p.join(path)} else {path}} - edit in pijul/src/commands/file_operations.rs at line 109[4.171231]→[4.2413:2563](∅→∅),[4.330]→[4.171231:171296](∅→∅),[4.2563]→[4.171231:171296](∅→∅),[4.2881]→[4.171231:171296](∅→∅),[4.171231]→[4.171231:171296](∅→∅)
/// 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")]repo_path: Option<PathBuf>, - replacement in pijul/src/commands/file_operations.rs at line 121
let repo = Repository::find_root(self.repo_path.clone())?;let repo = Repository::find_root(None)?; - edit in pijul/src/commands/file_operations.rs at line 179[4.172507]→[4.172507:172540](∅→∅),[4.172540]→[4.2564:2714](∅→∅),[4.2714]→[4.172540:172572](∅→∅),[4.3031]→[4.172540:172572](∅→∅),[4.4088]→[4.172540:172572](∅→∅),[4.172540]→[4.172540:172572](∅→∅)
#[clap(long = "repository")]/// Set the repository where this command should run. Defaults to the first ancestor of the current directory that contains a `.pijul` directory.repo_path: Option<PathBuf>, - replacement in pijul/src/commands/file_operations.rs at line 185
let repo = Repository::find_root(self.repo_path.clone())?;let repo = Repository::find_root(None)?;