aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/patch.c
AgeCommit message (Collapse)Author
2019-01-14Minor cleanups to patch. (Mostly whitespace and brackets.)Rob Landley
2019-01-13Better 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-12patch: add -s to the synopsis line and fix typos.Elliott Hughes
2019-01-11patch: add -s/--quiet.Elliott Hughes
Used by AOSP build. Also switch to new FLAG macro. Bug: http://b/122739027
2018-12-04Clean 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-25Convert more argument variables in GLOBALS() to new style.Rob Landley
2018-04-08Add mkpath() for common case of mkpathat(), and #define magic constants.Rob Landley
2016-08-04Make 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-30Add patch -d and --dry-runRob Landley
2015-11-01Last patch broke creating new file as a patch, fix it.Rob Landley
(Matches beginning and EOF at once.)
2015-11-01Fix applying patch hunks with trailing context to the start of the file.Rob Landley
2014-08-05Fix a couple patch bugs concerning error output.Rob Landley
2014-06-28Use dlist_terminate() in patch.Rob Landley
2014-03-11Move mkpathat to lib, remove redundant function used by patch.Rob Landley
2013-10-31Make 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-09Adjust patch to use dlist_pop()Rob Landley
2013-03-21Fix a bug in patch I fixed back in 2010 but forgot to apply here.Rob Landley
2012-11-13Reindent 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-12Yet another attempt to get the fiddly patch file creation logic right.Rob Landley
2012-11-10Fix 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-08New 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-07Missing line in patch -l. Oops.Rob Landley
2012-10-06patch -l (loose match)Rob Landley
2012-08-25Regularize command headers, update links to standards documents.Rob Landley
2012-08-25Move commands into "posix", "lsb", and "other" menus/directories.Rob Landley