| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
src/pch.c (another_hunk): Call set_hunkmax() from here to make sure it is
called even when falling back from plan A to plan B.
(open_patch_file): No need to call set_hunkmax() anymore.
src/pch.c (set_hunkmax): Fail when out of memory. Make static.
src/pch.h: Remove set_hunkmax() prototype.
|
| |
|
|
|
| |
* src/util.c: Move symlink_target_is_valid() and cwd_is_root() here from
src/pch.c.
|
| |
|
|
|
|
|
|
|
|
|
| |
When creating symlinks from git-style patches, make sure the symlinks don't
point above the current working directory. Otherwise, a subsequent patch could
use the symlink to write outside the working directory.
* src/pch.c (symlink_target_is_valid): New function to check for valid symlink
targets.
* src/util.c (move_file): Use symlink_target_is_valid() here.
* tests/symlinks: Add valid and invalid symlink test cases.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* src/pch.c (p_sha1): New variable.
(get_sha1): New function for saving a sha1 checksum.
(sha1_says_nonexistent): Take a NULL terminated string instead of an end
pointer.
(intuit_diff_type): Remember the SHA1 hashes from index headers in git-style
diffs in p_sha1.
(pch_sha1): New function for accessing p_sha1.
* src/pch.h (pch_sha1): Declare.
|
| |
|
|
|
|
| |
* src/pch.c (p_git_diff): New global variable.
(intuit_diff_type): Use p_git_diff instead of a local variable.
(pch_git_diff): New function.
|
| |
|
|
| |
Run "make update-copyright".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mark functions as pure of const, per recommendations enabled by
new gcc -W options. Apply _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST.
* src/common.h: Apply new function attributes.
* src/pch.c: Likewise.
* src/pch.h: Likewise.
* src/util.c: Likewise.
* src/util.h: Likewise.
* configure.ac: Use -Wno-format-nonliteral.
* m4/.gitignore: Update.
* gnulib: Update to latest.
* cfg.mk: Exempt src/util.c from two tests, to avoid new
"make syntax-check" failures.
|
| |
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add update-copyright.
Run "make update-copyright".
|
| |
|
|
|
|
| |
* src/patch.c (mangled_patch): Add "noreturn" attribute.
* src/pch.h (pch_timestamp): Remove ignored "const" attribute.
* src/version.c (XTERN): Remove unused #undef and #define.
|
| |
|
|
|
|
|
| |
* 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/pch.c (p_copy, p_rename): New variables.
(pch_copy, pch_rename): New functions.
(intuit_diff_type): Parse the "copy from", "copy to", "rename from",
and "rename to" headers.
* src/util.c (fetchname): Return the fetched name per reference (after
freeing the previous name if any). Also free the previous timestamp
string if any.
|
| |
|
|
|
|
| |
* src/pch.c (intuit_diff_type, there_is_another_patch): Pass up the
file type.
* src/patch.c (main): Check for consistent file types.
|
| |
|
|
|
|
|
|
| |
* src/pch.c (p_mode): New variable.
(fetchmode, pch_mode): New functions.
(intuit_diff_type): Recognize git diffs which contain no hunks.
Parse and store the file modes in the "index", "old mode",
"new mode", "deleted file mode", and "new file mode" headers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/pch.h (pch_timestamp): Return timestamp as struct timespec
instead of time_t.
* src/pch.c: Use struct timespec instead of time_t. A tv_sec value
of -1 indicates "no timestamp".
* src/util.h (fetchname): Return timestamp as struct timespec
instead of time_t.
* src/util.c (fetchname): str2time() does not give us nanoseconds; set
them to zero for now.
* src/patch.c (main): Only use the seconds in timestamps for now.
* bootstrap.conf: Add the time module for getting struct timespec
declared on old hosts.
|
| |
|
|
| |
* Globally rename type LINENUM to lin (as in diffutils).
|
| |
|
|
|
|
|
|
| |
src/maketime.c, src/maketime.h, src/merge.c, src/partime.c,
src/partime.h, src/patch.c, src/pch.c, src/pch.h, src/quotesys.c,
src/util.c, src/util.h, src/version.c: Add year 2010 to copyright
notice. Replace the GPLv2 license template with the GPLv3 license
template.
|
| | |
|
| | |
|
| |
|