to the --merge option to choose the output formats for conflicts.
* patch.man: Document the new optional argument of --merge.
* src/merge.c (merge_hunk): Implement diff3-style conflicts.
* src/common.h (conflict_style): This global variable determines the
output format for conflicts.
* tests/merge: Add test cases for the diff3 output format.
'<' and '>' lines of normal-style diffs will have CRLF endings even
when the patch itself has not been CRLF mangled. Do not assume a
mangled patch in this case.
* tests/crlf-handling: Update test case to cover this case.
2.5.9: when none of the filenames in the old, new, and index headers
exists, patch chose the wrong filename (bug 28367).
(maybe_reverse): Return if the patch looks reversed, not if this
function toggled the reverse flag.
* tests/filename-choice: New test case.
* Makefile.in (TESTS): Add test case.
tests: accommodate ls' "alternate access control method" indicator
ls can output an additional byte after a file's permissions string,
e.g., rather than "rwxr--r-- ..." it can output "rwxr--r--+ ..."
or "rwxr--r--. ..." to indicate the presence of an ACL.
* tests/create-delete: Adjust sed filter to accommodate that.
* tests/preserve-mode-and-timestamp: Likewise.
* tests/test-lib.sh: Unset environment variables that influence
the behavior of patch.
* util.c (move_file): Add debug message when files have been seen
already. Fix leftover "empty uneadable" debug message.
Patch recognizes patches that have had their line endings converted
to CRLF and automatically strips CRs in that case. This generally is
the desired behavior, but if both the patch and the file(s) being patched have
CRLF line endings, patches that would apply without this heuristic will fail.
Modify the --binary option to disable the trailing CR stripping heuristic.
When a patch references a file more than once, patch may override
reject files it had just created.
Avoid this by first checking whether we have created reject files
ourselves, and append to such files instead of overwriting them in
that case. (This is similar to the backup file case except that
in the backup case, we must skip creating another backup instead
of appending.)
With a patch that includes rejects in more than one file and with the -r
option, rejects would overwrite themselves and only the rejects from
the last file would remain. Fix this.
No longer set reject file modes to the modes of the files they are
assiciated with: the previous behavior is inconsistent with global
reject files (-r), which are not associated with any particular file.