Do not run `pijul git` if there are uncommitted changes
[?]
Mar 1, 2021, 9:23 PM
WFXSB6RAB3GNOJ5VB63M5BHLUI7J5TPUUOGFE4ZWGLFWULK7RHAACDependencies
- [2]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting).
Change contents
- edit in pijul/src/commands/git.rs at line 51
let st = git.statuses(None)?;let mut uncommitted = false;for i in 0..st.len() {if let Some(x) = st.get(i) {if x.path_bytes().starts_with(b".pijul") {continue;}debug!("status = {:?}", x.status());if x.status() != git2::Status::CURRENT && x.status() != git2::Status::IGNORED {eprintln!("Uncommitted file: {:?}", x.path().unwrap());uncommitted = true;}}}if uncommitted {bail!("There were uncommitted files")}