Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-09-11 | Add NOP -f, -g#, and --no-backup-if-mismatch options. | Rob Landley | |
(All ignored, because they disable stuff we don't do.) | |||
2019-08-29 | diff and patch: support special characters in filenames with quoting as well ↵ | William Haddon | |
as unusual timestamp formats After further research and testing, I've produced a patch which handles all filenames with special characters by copying the GNU quoting behavior, and also treats anything following a tab as a timestamp. This increases both ability to handle possible filenames and ability to apply patches found in the field. In diff, quote and escape filenames according to the following rules. * Surround the filename with quotes if it contains a byte less than 0x20, a byte greater than or equal to 0x80, space, backslash, or quote. * Replace alert, backspace, form feed, newline, carriage return, tab, vertical tab, backslash, and quote with \a, \b, \f, \n, \r, \t, \v, \\, and \", respectively. * Replace other bytes less than 0x20 or greater than or equal to 0x80 with a backslash followed by the three octal digits representing the value of the byte. * Treat valid UTF-8 characters involving sequences of bytes greater than or equal to 0x80 the same as other sequences of such bytes. In patch, process quoted and escaped filenames according to the following rules. * If the filename does not begin with a quote, do not modify the filename. * Remove quotes surrounding the filename. * In quoted filenames, replace \a, \b, \f, \n, \r, \t, \v, \\, and \" with alert, backspace, form feed, newline, carriage return, tab, vertical tab, backslash, and quote, respectively. * In quoted filenames, replace a backslash followed by octal digits with the byte with that value in octal. Also, in patch, treat anything on a +++ or --- line following a tab character after the beginning of the filename as a timestamp, rather than part of the filename. | |||
2019-01-14 | Minor cleanups to patch. (Mostly whitespace and brackets.) | Rob Landley | |
2019-01-13 | Better support patching files with tabs in the name. | Rob Landley | |
Patch dates are optional these days, and I should properly work back from the end and only peel off properly formatted tab+date, but "tab followed by digit" is probably good enough and nobody's ever complained about just tab. And we still don't support patching filenames with newlines in them...) | |||
2019-01-12 | patch: add -s to the synopsis line and fix typos. | Elliott Hughes | |
2019-01-11 | patch: add -s/--quiet. | Elliott Hughes | |
Used by AOSP build. Also switch to new FLAG macro. Bug: http://b/122739027 | |||
2018-12-04 | Clean up some --help formatting. | Elliott Hughes | |
Be consistent about upper versus lower case. (Upper seems to have the majority, so I went with that, though I'm happy to provide the opposite patch as long as we're consistent!) Be consistent about using \t. (Though saving a few bytes seems like it might be better done in the code that generates help.h rather than directly in the source, since tabs make careful ASCII art layout hard enough that we regularly have things misaligned.) Remove trailing periods (most of which seem to have been added by me). Always use the US "human readable" rather than my British "human-readable", and be more consistent about declaring whether we're showing multiples of 1000 or 1024. Just say "verbose" rather than adding a useless "mode" or "output". | |||
2018-08-25 | Convert more argument variables in GLOBALS() to new style. | Rob Landley | |
2018-04-08 | Add mkpath() for common case of mkpathat(), and #define magic constants. | Rob Landley | |
2016-08-04 | Make xopen() skip stdin/stdout/stderr, add xopen_stdio() if you want stdout, | Rob Landley | |
add xopenro() that takes one argument and understands "-" means stdin, and switch over lots of users. | |||
2016-06-30 | Add patch -d and --dry-run | Rob Landley | |
2015-11-01 | Last patch broke creating new file as a patch, fix it. | Rob Landley | |
(Matches beginning and EOF at once.) | |||
2015-11-01 | Fix applying patch hunks with trailing context to the start of the file. | Rob Landley | |
2014-08-05 | Fix a couple patch bugs concerning error output. | Rob Landley | |
2014-06-28 | Use dlist_terminate() in patch. | Rob Landley | |
2014-03-11 | Move mkpathat to lib, remove redundant function used by patch. | Rob Landley | |
2013-10-31 | Make the patch -x option (only enabled with CONFIG_DEBUG) provide more ↵ | Rob Landley | |
information about why a patch didn't apply. (Offset of first nonmatching character at each line during seek phase.) | |||
2013-09-09 | Adjust patch to use dlist_pop() | Rob Landley | |
2013-03-21 | Fix a bug in patch I fixed back in 2010 but forgot to apply here. | Rob Landley | |
2012-11-13 | Reindent to two spaces per level. Remove vi: directives that haven't worked ↵ | Rob Landley | |
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style. The actual code should be the same afterward, this is just cosmetic refactoring. | |||
2012-11-12 | Yet another attempt to get the fiddly patch file creation logic right. | Rob Landley | |
2012-11-10 | Fix reversed test: patch creates a file if /dev/null or dated the epoch ↵ | Rob Landley | |
_and_ first hunk being replaced is 0 lines at start of file, not one or the other. | |||
2012-10-08 | New build infrastructure to generate FLAG_ macros and TT alias, #define ↵ | Rob Landley | |
FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate. | |||
2012-10-07 | Missing line in patch -l. Oops. | Rob Landley | |
2012-10-06 | patch -l (loose match) | Rob Landley | |
2012-08-25 | Regularize command headers, update links to standards documents. | Rob Landley | |
2012-08-25 | Move commands into "posix", "lsb", and "other" menus/directories. | Rob Landley | |