Explicitly adding .pijul is now forbidden
[?]
Jan 12, 2021, 1:19 PM
3J6IK4W2BA4RJJQYXZOQFU4AQ3WJIM3TUXUNNBIQ6M6TS2JSHT6QCDependencies
- [2]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [3]
AFWNXPBKPrevent the addition of .pijul to the repository - [4]
ZHABNS3SCanonicalize all paths - [5]
XTMYHJZLChanging the default filters for ignored files - [6]
OJZWJUF2MUCH faster `pijul add -r` - [7]
4VWXL6KQCorrect handling of ignore files - [8]
4OCC6D42Recursive add - [*]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting).
Change contents
- replacement in libpijul/src/working_copy/filesystem.rs at line 144
let meta = std::fs::metadata(&full);let meta = std::fs::metadata(&full)?; - replacement in libpijul/src/working_copy/filesystem.rs at line 149
if !filter_ignore(&repo_path.as_canonical_path(), &full.as_canonical_path(), meta.is_dir()) {return Ok(())} - replacement in libpijul/src/working_copy/filesystem.rs at line 153[2.19764]→[4.1063:1195](∅→∅),[4.1063]→[4.1063:1195](∅→∅),[4.1195]→[3.243:445](∅→∅),[3.445]→[4.1291:2061](∅→∅),[4.77]→[4.1291:2061](∅→∅),[4.1291]→[4.1291:2061](∅→∅)
if let Ok(meta) = meta {if meta.is_dir() {let mut walk = WalkBuilder::new(&full);walk.ignore(true).git_ignore(true).filter_entry(|p| p.file_name() != crate::DOT_DIR).threads(threads - 1);walk.build_parallel().run(|| {Box::new(|entry| {let entry: ignore::DirEntry = if let Ok(entry) = entry {entry} else {return ignore::WalkState::Quit;};let p = entry.path();if let Some(p) = p.file_name() {if let Some(p) = p.to_str() {if p.ends_with("~") || (p.starts_with("#") && p.ends_with("#")){return ignore::WalkState::Skip;}if meta.is_dir() {let mut walk = WalkBuilder::new(&full);walk.ignore(true).git_ignore(true).filter_entry(|p| {debug!("p.file_name = {:?}", p.file_name());p.file_name() != crate::DOT_DIR}).threads(threads - 1);walk.build_parallel().run(|| {Box::new(|entry| {let entry: ignore::DirEntry = if let Ok(entry) = entry {entry} else {return ignore::WalkState::Quit;};let p = entry.path();if let Some(p) = p.file_name() {if let Some(p) = p.to_str() {if p.ends_with("~") || (p.starts_with("#") && p.ends_with("#")){return ignore::WalkState::Skip; - replacement in libpijul/src/working_copy/filesystem.rs at line 177[4.2125]→[4.1903:2273](∅→∅),[4.2273]→[4.1739:1941](∅→∅),[4.1941]→[4.2361:2476](∅→∅),[4.2361]→[4.2361:2476](∅→∅)
debug!("entry path = {:?} {:?}", entry.path(), repo_path);if let Ok(entry_path) = CanonicalPathBuf::canonicalize(entry.path()) {if let Ok(path) = entry_path.as_path().strip_prefix(&repo_path) {let is_dir = entry.file_type().unwrap().is_dir();if sender.send((path.to_path_buf(), is_dir)).is_err() {return ignore::WalkState::Quit;}} else {debug!("entry = {:?}", entry.path());}debug!("entry path = {:?} {:?}", entry.path(), repo_path);if let Ok(entry_path) = CanonicalPathBuf::canonicalize(entry.path()) {if let Ok(path) = entry_path.as_path().strip_prefix(&repo_path) {let is_dir = entry.file_type().unwrap().is_dir();if sender.send((path.to_path_buf(), is_dir)).is_err() {return ignore::WalkState::Quit; - edit in libpijul/src/working_copy/filesystem.rs at line 185
} else {debug!("entry = {:?}", entry.path()); - replacement in libpijul/src/working_copy/filesystem.rs at line 188
ignore::WalkState::Continue})}ignore::WalkState::Continue - replacement in libpijul/src/working_copy/filesystem.rs at line 191[4.2680]→[4.2511:2604](∅→∅),[4.2604]→[4.2754:2825](∅→∅),[4.2754]→[4.2754:2825](∅→∅),[4.2825]→[4.3413:3431](∅→∅),[4.3413]→[4.3413:3431](∅→∅)
} else if let Ok(path) = full.as_path().strip_prefix(&repo_path.as_path()) {sender.send((path.to_path_buf(), false)).unwrap();}})} else {debug!("filter_ignore ok");let path = full.as_path().strip_prefix(&repo_path.as_path()).unwrap();sender.send((path.to_path_buf(), false)).unwrap();