35 Commits

Author SHA1 Message Date
Eric S. Raymond
aac14e3187 Fix some formatting problems in the manpage
* patch.1: Use higher-level markup that translates better into HTML and other
formats.  (With changes by Andreas Gruenbacher.)
2013-06-18 09:48:32 +02:00
Andreas Gruenbacher
082baa326a Clarify the description of option --forward
* patch.man: Clarify the description of option --forward.
2013-01-03 22:19:20 +01:00
Andreas Gruenbacher
293415dbcf Add --follow-symlinks option for backwards compatibility
* src/common.h (follow_symlinks): New variable.
* src/patch.c (longopts): Add new --follow-symlinks option.
(get_some_switches): Recognize the new option.
* src/util.c (stat_file): Follow symlinks if requested.
* patch.man: Document the new option.
* tests/symlinks: Add test case.
2012-09-19 03:16:07 +02:00
Andreas Gruenbacher
3b934d6903 Document command-line options in alphabetic order
* patch.man: The options are mostly listen in alphabetical order; stick to
that.
2012-09-19 02:51:23 +02:00
Andreas Gruenbacher
9a26fde226 Only warn when trying to modify read-only files
Failing when trying to patch read-only files causes various users of patch to
break.  Instead, warn by default and introduce a command line option for
choosing a different behavior.
* patch.man: Describe the new behavior and command-line option.
* src/patch.c (read_only_behavior): New variable.
(main): Implement the new behavior.
(longopts): Add the new --read-only option.
(option_help): Describe the new behavior.
(get_some_switches): Recognize the new --read-only option.
2012-04-17 16:48:19 +02:00
Andreas Gruenbacher
cabd1add57 Refuse to patch read-only files
* 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.
2010-05-02 12:40:35 +02:00
Andreas Gruenbacher
3288f660a0 Document the recent changes
* patch.man: Describe the fixed behavior of --set-time and --set-utc
for timestamps that include time zones.
* NEWS: Update.
2010-04-23 21:43:45 +02:00
Andreas Gruenbacher
70c5b3126f Clarify the description of the -N option
* patch.man: Clarify the description of the -N option.
2010-02-17 16:49:12 +01:00
Andreas Gruenbacher
9fef208ad7 * patch.man: Clarify the description of the -F / --fuzz option. 2009-12-30 14:54:10 +01:00
Andreas Gruenbacher
6b65755542 * patch.man: Try to improve the documentation of patch's CRLF handling
behavior.
2009-12-29 20:02:50 +01:00
Andreas Gruenbacher
8cc8b7061c * src/patch.c (longopts, get_some_switches): Add an optional argument
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.
2009-12-29 17:03:14 +01:00
Andreas Gruenbacher
7f5e5b5ec1 Fix typo in patch.man (reported by Vytautas Šaltenis) 2009-10-27 16:38:02 +01:00
Andreas Gruenbacher
62d03acb14 The -m option hasn't been officially allocated yet; use only the long form for now (--merge) 2009-07-19 17:50:54 +02:00
Vincent Legoll
b008dece18 Change the default value of PATCH_GET to 0
Patch should default to not try to get files from revision control software
unless actively asked by the user with the "-g" or "--get" command-line
switches, or the PATCH_GET environment variable.

Make the posixly correct behaviour of not using source control, the global
patch default. I.e. default to "-g0".

This is related to debian BTS bug: #200895
Please refer to that discussion for more background
information and discussion.
2009-05-12 14:32:15 +02:00
Andreas Gruenbacher
2e583114c7 Add support for sending output to standard output 2009-04-08 06:23:11 +02:00
Andreas Gruenbacher
aba1379506 Improve the description of --binary in patch.man 2009-04-07 13:58:07 +02:00
Andreas Gruenbacher
fea737a1b5 Document that merging can be slow 2009-04-05 23:46:02 +02:00
Andreas Gruenbacher
a03f22893c Copyright notice updates 2009-04-05 21:12:30 +02:00
Andreas Gruenbacher
802b26e78d Revert (almost) to the original asymmetric hunk behavior and document that 2009-04-05 20:24:04 +02:00
Andreas Gruenbacher
a3b6c4bbe6 Update the NEWS file 2009-04-03 11:18:47 +02:00
Andreas Gruenbacher
863fbb0459 Update patch.man 2009-04-03 10:58:44 +02:00
Andreas Gruenbacher
8a3f4d70e4 Enforce simple backup mode and compute the backup file name if -B, -Y, or -z is used
This fixes the case where -B or -Y is combined with -z (bug 25968).
2009-03-28 16:50:09 +01:00
Andreas Gruenbacher
9928568691 Remove obsolete RCS $Id$ tags 2009-03-22 13:40:03 +01:00
Andreas Gruenbacher
b7687446d1 Disable trailing CR stripping with --binary
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.
2009-03-22 13:39:46 +01:00
Andreas Gruenbacher
a1bdf4a383 Man page: Use plain asterisk instead of \[**] (asteriskmath)
(Found in the Debian package.)
2009-03-22 13:39:17 +01:00
Andreas Gruenbacher
b80bfda68f Make "patch -r rejfile" work even when there are several rejects
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.
2009-03-22 13:39:09 +01:00
Andreas Gruenbacher
0a22c10196 Add unified reject format and the --reject-format=FORMAT option 2009-03-22 13:38:46 +01:00
Andreas Gruenbacher
712cce6fdd Import of patch-2.5.7.tar.gz 2009-03-17 21:43:20 +01:00
Andreas Gruenbacher
79159942f1 Import of patch-2.5.4.tar.gz 2009-03-12 15:17:49 +01:00
Andreas Gruenbacher
957f7b6423 Import of patch-2.5.3.tar.gz 2009-03-12 15:17:03 +01:00
Andreas Gruenbacher
6b2b462038 Import of patch-2.5.tar.gz 2009-03-12 15:15:49 +01:00
Andreas Gruenbacher
6263c220df Import of patch-2.4.tar.gz 2009-03-12 15:15:17 +01:00
Andreas Gruenbacher
1adb4535a3 Import of patch-2.3.tar.gz 2009-03-12 15:14:29 +01:00
Andreas Gruenbacher
bcce123390 Import of patch-2.2.tar.gz 2009-03-12 15:13:11 +01:00
Andreas Gruenbacher
068f401ee3 Import of patch-2.1.tar.gz 2009-03-12 15:09:25 +01:00