ELG3UDT6OJFEYSJR7HZEC65IUWBMGPPPCXEW3CDW5T74R6KC5LIAC 6YZAVBWU6E5FYOI5JGEIPXGZLIKAW6LS2AOFIQWEE5DMOPPCD5PQC WT3GA27PQ2AOAIGK65O3Q4DMX4AZDVNULBLRL6GF4QW6QCASUEAAC UB2ITZJSDADVINSQEZ3HA6PVGA7OA6JYFG5GMSO7Y7LOXJC4FI7AC EC3TVL4X6VZZVLOKUN63LC73ADPHBHMZO7QMDXGX2ZPURVI4B4XQC KT5UYXGKEEXUHURNOYFVIG7WQ3Y3SJZMM2TP4OSW6NXSXQ5XXRHAC SWWE2R6MVBX5CNM6X3WLXZTSRTU53PBJL7WJSFVF77XBPXDX4COAC }txn.commit().unwrap();}pub fn rm(repo: &mut pijul::Repository, path_str: &str) {let mut txn = repo.pristine.mut_txn_begin().unwrap();let full_path = {let mut p = repo.path.clone();p.push(path_str);p};let path = full_path.canonicalize().unwrap();let path_str = path_slash::PathExt::to_slash_lossy(path.as_path());if txn.is_tracked(&path_str).unwrap() {txn.remove_file(&path_str).unwrap();
Message::RmAddedFile => {if let Some(cursor::Selection::ChangedFile { ix, path }) =state.cursor.selection.as_ref(){let file = state.repo.changed_files.iter().nth(*ix).unwrap();if let repo::ChangedFileDiff::Add = &file.diff {repo::rm(&mut state.repo.state, path);let file = file.clone();// Remove from changed fileslet removed = state.repo.changed_files.remove(&file);debug_assert!(removed,"{:?} not found in {:?}",file, state.repo.changed_files);// Update untracked filesstate.repo.untracked_files.insert(file.path);// Select the next changed file, if anystate.cursor.selection =if state.repo.changed_files.is_empty() {None} else {let ix = cmp::min(*ix,state.repo.changed_files.len() - 1,);Some(changed_file_selection(state, ix))};}}}