summaryrefslogtreecommitdiff
path: root/sys/src/cmd/diff
AgeCommit message (Collapse)Author
2023-05-03diff: fix suicide if binary files don't diffJacob Moody
2023-04-01diff: barf with explanation on binary diffs/mergesOri Bernstein
2023-03-04diff: add missing fileOri Bernstein
2023-03-04diff, merge3: refactor diff, implement merge3Ori Bernstein
Refactor diff internals to allow multiple diffs to be done in the same process. This allows a merge3 to be implemented off the guts of diff. Tests are added, files with no end of line terminator are currently broken.
2022-06-04diff: avoid empty hunks when there are no changesOri Bernstein
Currently, diff outputs a file header, even if there are no changes to the file. This is wonky. It means that the header chunks are ambiguous, since not all header chunks are followed by '@@ hunk', and '--- file', '+++ file' lines can be generated from file content. This changes the way that we decide to print the file header, so we only print it when outputting the first hunk on flushchanges. Flushchanges is called once per regular file, at the end of `diffreg`, so we output a hunk header once per file.
2022-05-22diff: clean up some commentsOri Bernstein
I did the tidying and fixes. Let's remove those comments.
2022-05-22diff: retain original file namesOri Bernstein
When diffing non-regular files, like /dev/null, pipes, and similar, diff will generate a temp file to diff against. This is the right thing to do, but the temp file leaks into the diff. This patch retains the original file name all the way through to diff output.
2022-05-22diff: fix styleOri Bernstein
remove useless macros, bring formatting closer to regular 9front formatting, and use the ARGBEGIN/ARGEND macros. No functional change.
2021-11-09diff: revert last change, this breaks git/diffcinap_lenrek
2021-11-05diff: fix -u when comparing identical filesKyle Milz
2020-11-16diff: fix change marker for -c modekvik
2020-09-21diff: support unified diff via -uOri Bernstein
The format produced by `diff -u` is inferior to that produced by `diff -c`, but it's what ape/patch and unix patch expect, so it's useful to generate it. This patch adds `diff -u`.
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen