<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/copy.c, branch v8.18</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.18</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2012-05-07T11:39:48Z</updated>
<entry>
<title>cp: handle a race condition more sensibly</title>
<updated>2012-05-07T11:39:48Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-05-04T14:42:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ee9e43460f366406edff96b5abfb3ff33587e062'/>
<id>urn:sha1:ee9e43460f366406edff96b5abfb3ff33587e062</id>
<content type='text'>
* src/copy.c (copy_reg): In a narrow race (stat sees dest, yet
open-without-O_CREAT fails with ENOENT), retry the open with O_CREAT.
* tests/cp/nfs-removal-race: New file.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
Reported by Philipp Thomas and Neil F. Brown in
http://bugs.gnu.org/11100
</content>
</entry>
<entry>
<title>cp,mv,install: provide POSIX_FADV_SEQUENTIAL hint to input</title>
<updated>2012-05-02T17:41:53Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-05-01T20:50:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=15f1d0c9aad23f5ada64594c127ca015d4d8dbfe'/>
<id>urn:sha1:15f1d0c9aad23f5ada64594c127ca015d4d8dbfe</id>
<content type='text'>
This was inadvertently omitted from v8.5-104-g47076e3,
and gives the same 5% speedup when copying from an SSD.

* src/copy.c (copy_internal): Apply the FADVISE_SEQUENTIAL hint.
</content>
</entry>
<entry>
<title>maint: with split lines, don't leave an operator at end of line</title>
<updated>2012-05-02T08:31:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-01T00:46:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b8a6996e258a2c30de40fb20cab0d17a38c3eff2'/>
<id>urn:sha1:b8a6996e258a2c30de40fb20cab0d17a38c3eff2</id>
<content type='text'>
* src/copy.c (copy_reg): Split an expression before a binary operator,
not after it.
* src/cut.c (set_fields): Likewise.
* src/id.c (main): Likewise.
* src/install.c (setdefaultfilecon): Likewise.
* src/join.c (ignore_case): Likewise.
* src/pr.c (cols_ready_to_print, init_parameters, print_page): Likewise.
* src/stty.c (set_window_size): Likewise.
* src/wc.c (SUPPORT_OLD_MBRTOWC): Likewise.
* src/who.c (scan_entries): Likewise.
* src/test.c (binary_operator): Join a split line.
* src/extent-scan.c (extent_scan_read): Move an "&gt;" from end of line
to beginning of the following.
Likewise for two other expressions.
</content>
</entry>
<entry>
<title>cp: change --attributes-only to not truncate existing files</title>
<updated>2012-04-12T17:35:17Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-04-12T11:47:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3d53e7fe1c31aa440cc9708c7c51db6b78c07653'/>
<id>urn:sha1:3d53e7fe1c31aa440cc9708c7c51db6b78c07653</id>
<content type='text'>
* src/copy.c (copy_reg): Don't truncate an existing file,
to support copying attributes between existing files.
The original use case only considered creating new files,
and it would be a very unusual use case to be relying
on the truncating behavior.
* doc/coreutils.texi (cp invocation): Mention the non
truncating behavior.
* tests/cp/attr-existing: A new test to ensure O_TRUNC skipped.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the change in behavior.
</content>
</entry>
<entry>
<title>maint: refactor copy to use is_nul()</title>
<updated>2012-03-06T23:43:21Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-03-01T11:56:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4b4a465798a212925670cc4fef7610678d221d69'/>
<id>urn:sha1:4b4a465798a212925670cc4fef7610678d221d69</id>
<content type='text'>
* src/dd.c: Move is_nul() from here to ...
* src/system.h: ... here
* src/copy.c (sparse_copy): Adjust to use the refactored is_nul()
</content>
</entry>
<entry>
<title>mv: "mv A B" would sometimes succeed, yet A would remain, ...</title>
<updated>2012-02-12T11:21:53Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-02-01T20:42:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b01355a1dc4939a3967ee82ac0a6dd19702778c3'/>
<id>urn:sha1:b01355a1dc4939a3967ee82ac0a6dd19702778c3</id>
<content type='text'>
But only when both A and B were hard links to the same symlink.
* src/copy.c (same_file_ok): Handle another special case: the one
in which we are moving a symlink onto a hard link to itself.
In this case, we must explicitly tell the caller to unlink the
source file.  Otherwise, at least the linux-3.x kernel rename
function would do nothing, as mandated by POSIX 2008.
* tests/mv/symlink-onto-hardlink-to-self: New test.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
Reported by Bernhard Voelker in http://bugs.gnu.org/10686
</content>
</entry>
<entry>
<title>mv: allow moving symlink onto same-inode dest with &gt;= 2 hard links</title>
<updated>2012-01-30T19:43:07Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-05T10:45:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d1b0155d805ce51d8f155e648d1e9ad2edb95397'/>
<id>urn:sha1:d1b0155d805ce51d8f155e648d1e9ad2edb95397</id>
<content type='text'>
Normally, mv detects a few subtle cases in which proceeding with a
same-file rename would, with very high probability, cause data loss.
Here, we have found a corner case in which one of these same-inode
tests makes mv refuse to perform a useful operation.  Permit that
corner case.
* src/copy.c (same_file_ok): Detect/exempt this case.
* tests/mv/symlink-onto-hardlink: New test.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
Initially reported by: Matt McCutchen in http://bugs.gnu.org/6960.
Raised again by Anders Kaseorg due to http://bugs.debian.org/654596.
Improved-by: Paul Eggert.
</content>
</entry>
<entry>
<title>maint: use single copyright year range</title>
<updated>2012-01-27T10:35:24Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-27T10:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d7878454cd02518959b0d6036db3a5b6ff00ca57'/>
<id>urn:sha1:d7878454cd02518959b0d6036db3a5b6ff00ca57</id>
<content type='text'>
Run "make update-copyright".
</content>
</entry>
<entry>
<title>maint: src/*.[ch]: convert more `...' to '...'</title>
<updated>2012-01-09T20:51:59Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-08T20:03:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3ba8b044267a5f7cfa8a7b0d7f19dab3f21431da'/>
<id>urn:sha1:3ba8b044267a5f7cfa8a7b0d7f19dab3f21431da</id>
<content type='text'>
Run this (twice):
  git grep -E -l '`.+'\' src/*.[ch] \
    |xargs perl -pi -e 's/`(.+?'\'')/'\''$1/'
</content>
</entry>
<entry>
<title>maint: src/*.c: change remaining quotes (without embedded spaces)</title>
<updated>2012-01-09T20:50:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-08T14:08:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a517386f1bf8c64ee7617cc2c9d0a16a1d85c8c4'/>
<id>urn:sha1:a517386f1bf8c64ee7617cc2c9d0a16a1d85c8c4</id>
<content type='text'>
Run this (twice):
  git grep -E -l '`[^ ]+'\' src/*.c \
    |xargs perl -pi -e 's/`([^ ]+'\'')/'\''$1/'
</content>
</entry>
</feed>
