| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
* tests/create-delete: New test case creating a file in a new
sub-directory (bug fixed on 2010-12-04).
|
|
|
|
|
|
|
| |
* src/pch.c (open_patch_file): Also check if the input file is
seekable if a filename is given (-i).
* tests/pipe: New file. Test this.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
| |
* NEWS: Mention the fix.
|
|
|
|
|
|
|
|
|
|
| |
This addresses CVE-2010-4651, reported by Jakub Wilk.
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2010-4651
* src/util.c (strip_leading_slashes): Reject absolute file names
and file names containing a component of "..".
* tests/bad-filenames: New file. Test for this.
* tests/Makefile.am (TESTS): Add it.
Improvements by Andreas Gruenbacher.
|
|
|
|
|
| |
* src/util.c (make_tempfile): Create missing directories when
necessary.
|
|
|
|
|
| |
* src/util.c: USE_XATTR is defined to 0 or 1, so we need to use #if
instead of #ifdef.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/patch.c (main): Set all file attributes of the temporary output
file before renaming it over the final output file (possibly replacing
the input file). Pass the input file name to set_file_attributes().
* src/util.c (set_file_attributes): When enabled (USE_XATTR), also
copy extended attributes including attributes which define
permissions.
(copy_attr_error, copy_attr_quote, copy_attr_free, copy_attr_check,
copy_attr): Helper functions for copying extended attributes.
* m4/xattr.m4 (gl_FUNC_XATTR): Import from coreutils.
* src/Makefile.am (patch_LDADD): Add $(LIB_XATTR) here.
* bootstrap.conf: Use the gnulib verror module.
|
|
|
|
|
|
| |
* src/util.c (set_file_attributes): Always expect the mode
argument to be set when FA_MODE is specified.
(create_backup_copy): Update accordingly.
|
|
|
|
| |
* configure.ac: Remove obsolete checks for mktemp.
|
|
|
|
| |
* src/patch.c (print_header_line): Remove obsolete comment.
|
|
|
|
|
|
| |
* src/pch.c (there_is_another_patch): Set p_strip_trailing_cr
to false if no_strip_trailing_cr is set independent of the verbosity.
This broke the --binary option in combination with --silent.
|
|
|
|
|
|
|
|
| |
* src/util.c: Add a maybe_quoted parameter to fetchname.
* src/pch.c: Only recognize quited filename in the "diff --git"
format, at least for now.
* tests/quoted-filenames: Update accordingly.
* NEWS: Update accordingly.
|
|
|
|
| |
* tests/criss-cross: Add copy-after-modify test case.
|
|
|
|
|
|
| |
* NEWS: Document that "diff --git" criss-cross renames are broken
still.
* tests/criss-cross: Test case currently expected to fail.
|
|
|
|
|
|
|
|
|
| |
* src/patch.c (main): Generate the "patching file" message here. When
the input and output file name is not he same, include both names in
the message.
* src/inp.c (scan_input): Previously the "patching file" message was
generated here.
* tests/unmodified-files, tests/copy-rename: Update.
|
|
|
|
| |
* src/inp.c (scan_input): Remove double quotearg().
|
|
|
|
|
| |
* src/patch.c (main): Compute TMPOUTNAME with make_tempfile().
(make_temp): Remove obsolete function.
|
|
|
|
|
|
|
| |
* src/patch.c (main): Compute TMPREJNAME with make_tempfile() only if
needed.
(abort_hunk, init_reject): Pass through the output file name, and base
TMPREJNAME on it.
|
|
|
|
| |
* src/patch.c (abort_hunk_unified): Replace unnecessary local variable.
|
|
|
|
|
| |
* src/pch.c (open_patch_file): Compute TMPPATNAME with make_tempfile()
if needed instead of precomputing it in src/patch.c (main).
|
|
|
|
|
| |
* src/inp.c (plan_b): Compute TMPINNAME with make_tempfile() if needed
instead of precomputing it in src/patch.c (main).
|
|
|
|
|
| |
* bootstrap.conf: Use the gnulib tempname module.
* src/util.c (make_tempfile): New function.
|
|
|
|
|
|
|
| |
* src/pch.c (do_ed_script): Add inname, outname, and
outname_needs_removal arguments. This isolates TMPOUTNAME and
TMPOUTNAME_needs_removal to patch.c.
* src/patch.c (main): Update do_ed_script() call.
|
|
|
|
|
| |
* src/patch.c (open_outfile): New function.
(init_output): Split into open_outfile() and the rest.
|
| |
|
|
|
|
| |
* src/patch.c: Stop "patch --get 1" from segfaulting.
|
|
|
|
|
| |
* src/patch.c: The read-only file check was not done for ed scripts;
fix this.
|
|
|
|
|
| |
* tests/corrupt-reject-files, tests/crlf-handling: On Solaris, cat's
-e option is only effective if -v is specified as well.
|
|
|
|
|
| |
* tests/test-lib.sh: Ignore error messages when cleaning up after a
test has finished.
|
|
|
|
|
| |
* tests/test-lib.sh: Only use GNU diff when available.
* tests/dash-o-append: Fix the expected result.
|
|
|
|
|
| |
* tests/create-delete: Do not use 'diff' here.
* tests/merge: Require GNU diff.
|
|
|
|
| |
* bootstrap.conf: Use the gnulib unistd module.
|
|
|
|
|
| |
* bootstrap.conf: Use the gnulib mkdir module.
* m4/mkdir.m4: Delete.
|
|
|
|
|
| |
* tests/read-only-files: Remove the superuser test, and instead try
out if a read-only file can be written to.
|
|
|
|
|
| |
* tests/test-lib.sh: Create temporary directories in builddir; this
removes the need to do it safely: some systems do not have mktemp -d.
|
|
|
|
|
| |
* configure.ac, tests/Makefile: Remove $(TEST_SHELL) and use $(SHELL)
instead.
|
|
|
|
|
|
| |
* src/version.c: Put the Free Software Foundation copyright first.
* tests/read-only-files: Skip when run as superuser: even files
without write permissions would be writable.
|
|
|
|
|
|
|
|
|
| |
* src/pch.c (includes): Add <io.h> for setmode.
(intuit_diff_type): Avoid 8-bit problems.
* src/util.c (parse_name): Likewise.
* src/util.h (skip_spaces): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
* src/util.c (create_backup): Document patch's backup file logic.
(create_backup, create_backup_copy): Add a flag to remember the backup
file; use when a patch deletes a file.
(move_file, copy_file): Better error messages.
* tests/Makefile.am (TESTS): Remove remember-backup-files-2.
* tests/remember-backup-files: Add tests from remember-backup-files-2.
* tests/symlinks: Add a symlink backup file test.
|
|
|
|
|
|
|
|
| |
* tests/test-lib.sh: Flag tests with missing pre-requirements as
SKIPped instead of PASSed. Do not use GNU diff extensions, but
still require a diff that understands "-u".
* tests: Do not unnecessarily require GNU diff in a lot of tests.
Make the sed utility optional.
|
|
|
|
| |
* src/pch.c (intuit_diff_type): Remove left-over debugging code.
|
|
|
|
|
|
|
|
|
| |
* src/pch.c (maybe_reverse): Allow to create and delete empty files.
(sha1_says_nonexistent): New function for recognizing the sha1
checksums of nonexistent and empty files.
(skip_hex_digits): New helper function for skipping [0-9a-z].
(intuit_diff_type): Parse the sha1 checksums in index lines.
* tests/Makefile.am (XFAIL_TESTS): Remove empty-files.
|
| |
|
|
|
|
|
|
| |
* src/pch.c (intuit_diff_type): Fix a bug where the reversed-patch
check would wrongly pick the last name instead of the best name.
* src/create-delete: Add test cases for that.
|
|
|
|
|
|
|
| |
* src/pch.c (fetchmode): Document that the "diff --git" format does
not store file permissions of symlinks.
* src/util.c (set_file_attributes): Since we don't have symlink file
permissions, don't try to set them even on systems where we could.
|
|
|
|
| |
* tests/symlinks: Improve the backup file tests.
|
|
|
|
|
|
| |
* Removing an empty file does not work as expected.
* Deleted files are not being remembered correctly.
* Symlinks are not being remembered, either.
|
|
|
|
|
|
| |
* src/Makefile.am (patch_LDADD): Add $(LIB_CLOCK_GETTIME) here, after
libpatch.a, so that clock_gettime is properly resolved on systems on
which the library order matters.
|
|
|
|
|
| |
* gnulib: Update to latest.
* bootstrap: Update from gnulib.
|
|
|
|
|
|
|
|
|
| |
* src/patch.c (main): Refuse to patch read-only files, or at least warn
when patching such files with --force or --batch.
* patch.man: Document the changed behavior.
* tests/read-only-files: Split read-only file test case off from
tests/remember-backup-files.
* tests/Makefile.am: Add new test case.
|