<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/copy.c, branch v8.7</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.7</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-10-27T10:18:51Z</updated>
<entry>
<title>cp: make --attributes-only override --reflink completely</title>
<updated>2010-10-27T10:18:51Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-10-26T16:55:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=883ac22239036025896ff99bd4b2a6d02712f39f'/>
<id>urn:sha1:883ac22239036025896ff99bd4b2a6d02712f39f</id>
<content type='text'>
* doc/coreutils.texi (cp invocation): Change the description slightly
so as users might not immediately discount using this option.
Mention that --reflink is overridden by the other linking options and
--attributes-only, and give an example where this might be useful.
* src/copy.c (copy_internal): Bypass the reflink if
--attributes-only is specifed.
* tests/cp/reflink-perm: Ensure both --reflink modes are
overridden by --attributes-only.
* NEWS: Mention the change in behavior.
Reported by Jim Meyering.
</content>
</entry>
<entry>
<title>maint: update to latest gnulib</title>
<updated>2010-09-17T21:57:49Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2010-09-17T21:54:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2dd21704d63c4e7567695a9e43dc1631b930efe2'/>
<id>urn:sha1:2dd21704d63c4e7567695a9e43dc1631b930efe2</id>
<content type='text'>
* gnulib: Update to latest.
* src/copy.c (copy_reg): Use fdutimens instead of gl_futimens.
* src/touch.c (touch): Adjust parameter order.
* tests/init.sh: Resync from upstream.
</content>
</entry>
<entry>
<title>cp: add an option to only copy the file attributes</title>
<updated>2010-07-01T13:33:27Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-21T07:43:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1af81dfb4d24d104777b8917544d81097db0deab'/>
<id>urn:sha1:1af81dfb4d24d104777b8917544d81097db0deab</id>
<content type='text'>
* src/copy.c (copy_attr): A new function which merges copy_attr_by_fd
and copy_attr_by_name.  Also display all errors when --attributes-only
* src/copy.c (copy_reg): Skip copying the file contents if specified.
Refactor the SELinux error handling code a little and display all
SELinux errors when only copying attributes.
* src/copy.h (struct cp_options): Add a data_copy_required boolean
* src/cp.c (main): Default to copying data but don't if specified
* src/install.c: Default to copying data
* src/mv.c: Likewise
tests/cp/reflink-perm: Add a test to check that --attributes-only
does not copy data
* tests/cp/acl: Likewise. Also refactor to remove redundant
acl manipulation
* doc/coreutils.texi (cp invocation): Describe the new option
* NEWS: Mention the new feature
</content>
</entry>
<entry>
<title>maint: make spacing around "=" consistent, even in IF_LINT</title>
<updated>2010-05-31T09:02:21Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-05-15T17:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c0cfa0defe06fa750530f08d6e0a54521f83292d'/>
<id>urn:sha1:c0cfa0defe06fa750530f08d6e0a54521f83292d</id>
<content type='text'>
E.g.,
  -  size_t desired_width IF_LINT (= 0);
  +  size_t desired_width IF_LINT ( = 0);
Use this command:
  g grep -l IF_LINT | grep '\.[ch]$' \
    | xargs perl -pi -e 's/(IF_LINT \()= /$1 = /'
</content>
</entry>
<entry>
<title>maint: replace each "for (;;)" with "while (true)"</title>
<updated>2010-05-31T09:02:21Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-05-01T12:24:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=da7a704cd36e1d2015d14247e5139fb1999b2211'/>
<id>urn:sha1:da7a704cd36e1d2015d14247e5139fb1999b2211</id>
<content type='text'>
Run this command:
  git ls-files | grep '\.[ch]$' \
    | xargs perl -pi -e 's/for \(;;\)/while (true)/g'
...except for randint.c, which does not include stdbool.h.
In that case, use "while (1)".
* gl/lib/randint.c (randint_genmax): Use "while (1)" for infloops.
* src/cat.c (simple_cat, cat): Use "while (true)" for infloops.
* gl/lib/randread.c (readsource, readisaac): Likewise.
* src/copy.c (copy_reg): Likewise.
* src/csplit.c (record_line_starts, process_regexp): Likewise.
* src/cut.c (set_fields): Likewise.
* src/dd.c (iread, parse_symbols): Likewise.
* src/df.c (find_mount_point, main): Likewise.
* src/du.c (main): Likewise.
* src/expand.c (expand): Likewise.
* src/factor.c (factor_using_division, do_stdin): Likewise.
* src/fmt.c (get_space): Likewise.
* src/ls.c (decode_switches): Likewise.
* src/od.c (main): Likewise.
* src/pr.c (main, read_line): Likewise.
* src/shred.c (dopass, genpattern): Likewise.
* src/sort.c (initbuf, fillbuf, getmonth, keycompare): Likewise.
* src/split.c (bytes_split, lines_split): Likewise.
* src/tac.c (tac_seekable): Likewise.
* src/test.c (and, or): Likewise.
* src/tr.c (squeeze_filter, main): Likewise.
* src/tsort.c (search_item): Likewise.
* src/unexpand.c (unexpand): Likewise.
* src/uniq.c (main): Likewise.
* src/yes.c (main): Likewise.
</content>
</entry>
<entry>
<title>maint: remove now-unnecessary #if HAVE_header_H tests.</title>
<updated>2010-04-24T15:44:58Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-04-24T15:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2191fe8f8d84e39f8c4b861cde28d395639393e1'/>
<id>urn:sha1:2191fe8f8d84e39f8c4b861cde28d395639393e1</id>
<content type='text'>
* .x-sc_prohibit_always_true_header_tests: New file.
* Makefile.am (syntax_check_exceptions): Add it.
* src/cat.c: Remove #if HAVE_SYS_IOCTL_H test.
* src/copy.c: Likewise.
* src/ls.c: Likewise.
* src/stty.c: Likewise.
* src/install.c: Remove #if HAVE_SYS_WAIT_H test.
* src/kill.c: Likewise.
* src/operand2sig.c: Likewise.
* src/timeout.c: Likewise.
* src/pathchk.c: Remove #if HAVE_WCHAR_H test.
* src/stat.c: Remove #if HAVE_NETINET_IN_H test.
</content>
</entry>
<entry>
<title>cp: preserve "capabilities" when also preserving file ownership</title>
<updated>2010-04-16T22:02:02Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-04-16T07:39:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1777d0dfe34dc4d8c148a34a96eb92c6036ff7bd'/>
<id>urn:sha1:1777d0dfe34dc4d8c148a34a96eb92c6036ff7bd</id>
<content type='text'>
* src/copy.c (copy_reg): Copy xattrs _after_ setting file ownership
so that capabilities are not cleared when setting ownership.
* tests/cp/capability: A new root test.
* tests/Makefile.am (root_tests): Reference the new test.
* NEWS: Mention the fix.
</content>
</entry>
<entry>
<title>cp: treat selinux warnings consistently</title>
<updated>2010-04-13T12:09:50Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-04-13T11:49:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=584e38d8b3199924ce24f9fa075d27d0d82a2a8b'/>
<id>urn:sha1:584e38d8b3199924ce24f9fa075d27d0d82a2a8b</id>
<content type='text'>
* src/copy.c (copy_reg): Suppress SELinux ENOTSUP warnings consistently
between the destination being present or not.  Previously we did
not suppress ENOTSUP messages when the destination was present.
(copy_internal): Use the same ENOTSUP supression method as
copy_reg() even though the issue was not seen in this case.
* tests/cp/cp-a-selinux: Add a test case for the issue and
group the other test cases in the file more coherently.
* tests/cp/cp-mv-enotsup-xattr: Do the same check for xattr
warnings, even though they did not have the issue.
</content>
</entry>
<entry>
<title>maint: ftruncate is always available, even without gnulib</title>
<updated>2010-04-09T08:50:43Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-04-09T08:49:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ef5758c3282b3325340d8b601deed5ab5e7ade64'/>
<id>urn:sha1:ef5758c3282b3325340d8b601deed5ab5e7ade64</id>
<content type='text'>
Now that even MinGW provides ftruncate, we know that all
reasonable portability targets provide this function.
Remove the workaround code.  We nearly removed the gnulib
module three years ago:
  http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/9203
and it is now officially "obsolete".
* bootstrap.conf (gnulib_modules): Remove ftruncate.
* src/copy.c (copy_reg): Remove use of HAVE_FTRUNCATE and its
no-longer-used workaround code.
* src/truncate.c: Remove a comment about handling missing ftruncate.
</content>
</entry>
<entry>
<title>maint: add a space before open-paren, where lacking</title>
<updated>2010-03-17T17:28:28Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-03-17T17:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=46e01372773a9ca265009ca085a28aea313a3d73'/>
<id>urn:sha1:46e01372773a9ca265009ca085a28aea313a3d73</id>
<content type='text'>
* src/copy.c (copy_reg): Likewise.
* src/cut.c (main): Likewise.
* src/dd.c (main): Likewise.
* src/getlimits.c (print_int): Likewise.
* src/join.c (join): Likewise.
* src/pwd.c (logical_getcwd): Likewise.
* src/sort.c (specify_nmerge, mergefps, avoid_trashing_input): Likewise.
(merge): Likewise.
* src/uptime.c (usage): Likewise.
</content>
</entry>
</feed>
