Correct parsing of empty file additions
Dependencies
- [2]
FGIVSUFHFixing conflicts with the new patch parsing code, and introducing AddRoot - [3]
VO5OQW4WRemoving anyhow in libpijul - [4]
CCFJ7VO3Renaming "Record" to "Hunk" in the changes - [5]
5FI6SBEZRe-implement change printing and parsing - [6]
UN2M77YUTest new changes against the old code. Fix several small bugs. - [7]
YDMAIJ5VFixing the format of text changes (file additions under a new directory were not always accepted by the parser)
Change contents
- replacement in libpijul/src/change/text_changes.rs at line 708
let contents_res = {let contents = if contents.len() > 0 { - replacement in libpijul/src/change/text_changes.rs at line 723
xSome(Atom::NewVertex(x))} else {None - replacement in libpijul/src/change/text_changes.rs at line 732
contents: Some(Atom::NewVertex(contents_res)),contents, - edit in libpijul/src/change/text_changes.rs at line 790
assert!(!contents.is_empty()); - replacement in libpijul/src/change/text_changes.rs at line 894
// TODO: this code block looks suspect. Check the correctness.// If `contents.is_empty()`, we still need to add a// new empty vertex, so the following is ok: - edit in libpijul/src/change/text_changes.rs at line 902
// TODO: this maths is probably unnecessarily complicated