Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
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.
|
|
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.
|
|
I did the tidying and fixes. Let's remove those
comments.
|
|
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.
|
|
remove useless macros, bring formatting closer
to regular 9front formatting, and use the
ARGBEGIN/ARGEND macros. No functional change.
|
|
|
|
|
|
|
|
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`.
|
|
|
|
|