.pijul/config: simplify remotes and hooks
[?]
Nov 26, 2020, 9:14 PM
SEWGHUHQEEBJR7UPG3PSU7DSM376R43QEYENAZK325W46DCFMXKACDependencies
- [2]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [3]
L4JXJHWXpijul/*: reorganize imports and remove extern crate - [4]
VQPAUKBQchannel switch as an alias to reset - [5]
I52XSRUHMassive cleanup, and simplification - [6]
4H2XTVJ2Fix some mistakes in the docs
Change contents
- edit in pijul/src/config.rs at line 46
#[serde(default)] - replacement in pijul/src/config.rs at line 48
pub hooks: Option<Hooks>,#[serde(default)]pub hooks: Hooks, - edit in pijul/src/config.rs at line 54
#[serde(default)] - replacement in pijul/src/commands/record.rs at line 55
if let Some(ref hooks) = repo.config.hooks {for h in hooks.record.iter() {let mut proc = std::process::Command::new("bash").current_dir(&repo.path).args(&["-c", &h]).spawn()?;let status = proc.wait()?;if !status.success() {writeln!(stderr, "Hook {:?} exited with code {:?}", h, status)?;std::process::exit(status.code().unwrap_or(1))}for h in repo.config.hooks.record.iter() {let mut proc = std::process::Command::new("bash").current_dir(&repo.path).args(&["-c", &h]).spawn()?;let status = proc.wait()?;if !status.success() {writeln!(stderr, "Hook {:?} exited with code {:?}", h, status)?;std::process::exit(status.code().unwrap_or(1))