diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-07 19:51:05 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-07 19:51:05 (EDT) |
commit | 9b3d2ec0855e0ddea3332b072ac1fee39b8fd71f (patch) | |
tree | 054b965c9317bf91a533bc483f2bef57ffd15e41 /patches/0005-Allow-input-files-to-be-missing-for-ed-style-patches.patch | |
parent | b60cead7f381b10192559802604d585175611cad (diff) |
patches: Add upstream commits up to 9c98635
Diffstat (limited to 'patches/0005-Allow-input-files-to-be-missing-for-ed-style-patches.patch')
-rw-r--r-- | patches/0005-Allow-input-files-to-be-missing-for-ed-style-patches.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/0005-Allow-input-files-to-be-missing-for-ed-style-patches.patch b/patches/0005-Allow-input-files-to-be-missing-for-ed-style-patches.patch new file mode 100644 index 0000000..c58d80f --- /dev/null +++ b/patches/0005-Allow-input-files-to-be-missing-for-ed-style-patches.patch @@ -0,0 +1,33 @@ +From b5a91a01e5d0897facdd0f49d64b76b0f02b43e1 Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher <agruen@gnu.org> +Date: Fri, 6 Apr 2018 11:34:51 +0200 +Subject: [PATCH 05/17] Allow input files to be missing for ed-style patches + +* src/pch.c (do_ed_script): Allow input files to be missing so that new +files will be created as with non-ed-style patches. +--- + src/pch.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/pch.c b/src/pch.c +index bc6278c..0c5cc26 100644 +--- a/src/pch.c ++++ b/src/pch.c +@@ -2394,9 +2394,11 @@ do_ed_script (char const *inname, char const *outname, + + if (! dry_run && ! skip_rest_of_patch) { + int exclusive = *outname_needs_removal ? 0 : O_EXCL; +- assert (! inerrno); +- *outname_needs_removal = true; +- copy_file (inname, outname, 0, exclusive, instat.st_mode, true); ++ if (inerrno != ENOENT) ++ { ++ *outname_needs_removal = true; ++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true); ++ } + sprintf (buf, "%s %s%s", editor_program, + verbosity == VERBOSE ? "" : "- ", + outname); +-- +2.11.0 + |