/oss · 4 merged

uutils/diffutils

A rewrite of the diff and cmp tools in Rust, aiming to work the same as GNU diffutils.

the project on GitHub (opens in a new tab)
  1. 8 Nov 2026

    cmp lines up its byte offsets after skipped bytes

    What was broken
    With bytes skipped at the start, cmp -l padded each offset as if nothing had been skipped, so the columns came out wider than GNU cmp's.
    What I changed
    The column width now comes from the bytes actually left to compare, after the skips.
    Why it matters
    Scripts that read cmp -l output get the same text as with GNU cmp.

    see the code, #330 (opens in a new tab)

  2. 7 Nov 2026

    One-line adds and deletes print as a single number

    What was broken
    diff wrote a single added line as "1a2,2" where GNU diff writes "1a2". Deletes and the ed format had the same problem.
    What I changed
    One-line ranges are now written as one number, the same as GNU diff.
    Why it matters
    Tools and tests that compare against GNU diff output get the same text.

    see the code, #308 (opens in a new tab)

  3. 24 Oct 2026

    cmp takes sizes like 1K for how many bytes to compare

    What was broken
    Telling cmp to compare only the first 1K or 2M of two files failed with an invalid value error. It only took a plain number, while GNU cmp takes sizes with units.
    What I changed
    The byte limit now reads the same unit sizes as the option for skipping bytes at the start.
    Why it matters
    Scripts that limit cmp with sizes like 1K work the same as with GNU cmp.

    see the code, #309 (opens in a new tab)

  4. 22 Oct 2026

    Context diffs now mark whole changed blocks

    What was broken
    When a block of lines was replaced by a block of a different length, the context format marked only some lines as changed and showed the rest as plain deletions or additions. GNU diff marks the whole block.
    What I changed
    Every line in a changed block now gets the change mark, as in GNU diff.
    Why it matters
    Context diffs match GNU's output, so tools that read them see one change, not a split one.

    see the code, #311 (opens in a new tab)

← every project