Correct parsing of undelete hunks

pmeunier
Feb 27, 2023, 6:03 PM
NBM34JQZ3VLJO4B64WYAXNZVHXPNY2HY57LCWOZNX3UDG7PB2GBAC

Dependencies

  • [2] YQMLICLW Fix the hunk_roundtrip test, simplify code, improve test coverage, fix some edge cases.
  • [3] HW7DZ2B4 Fixing the change parser
  • [4] OOJNAY34 allow LF or CRLF when parsing change headers
  • [5] 5FI6SBEZ Re-implement change printing and parsing

Change contents

  • replacement in libpijul/src/change/parse.rs at line 97
    [3.231][3.67414:67481](),[2.1055][3.67414:67481](),[3.67414][3.67414:67481]()
    let (i, contents) = parse_contents('+', encoding.clone(), i)?;
    [2.1055]
    [3.67481]
    let (i, contents) = if let Ok(x) = parse_contents('+', encoding.clone(), i) {
    x
    } else {
    // Contents is optional for FileUndel hunks.
    (i, Vec::new())
    };