<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/mv, branch v9.3</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v9.3</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v9.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2023-04-08T11:11:58Z</updated>
<entry>
<title>cp,mv: issue "skipped" messages when skipping files</title>
<updated>2023-04-08T11:11:58Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-04-07T09:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f6c21f6d3addb6461c41af612e73fbb15d21545f'/>
<id>urn:sha1:f6c21f6d3addb6461c41af612e73fbb15d21545f</id>
<content type='text'>
* NEWS: Mention the change in behavior to issue a "not replaced"
error diagnostic with -n, and the "skipped" message with -v.
* src/copy.c (copy_internal): Adjust to output the "skipped" messages
depending on -i, -n, -u.
* tests/cp/cp-i.sh: Adjust accordingly.
* tests/mv/mv-n.sh: Likewise.
</content>
</entry>
<entry>
<title>cp,mv: add --update=none to always skip existing files</title>
<updated>2023-04-08T11:11:50Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-04-01T15:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=db28af406f311ac8f78604cc5906613866aecef5'/>
<id>urn:sha1:db28af406f311ac8f78604cc5906613866aecef5</id>
<content type='text'>
Add --update=none which is equivalent to the --no-clobber behavior
from before coreutils 9.2.  I.e. existing files are unconditionally
skipped, and them not being replaced does not affect the exit status.

* src/copy.h [enum Update_type]: A new type to support parameters
to the --update command line option.
[enum Interactive]: Add I_ALWAYS_SKIP.
* src/copy.c: Treat I_ALWAYS_SKIP like I_ALWAYS_NO (-n),
except that we don't fail when skipping.
* src/system.h (emit_update_parameters_note): A new function
to output the description of the new --update parameters.
* src/cp.c (main): Parse --update arguments, ensuring that
-n takes precedence if specified.
(usage): Describe the new option.  Also allude that
-u is related in the -n description.
* src/mv.c: Accept the new --update parameters and
update usage() accordingly.
* doc/coreutils.texi (cp invocation): Describe the new --update
parameters.  Also reference --update from the --no-clobber description.
(mv invocation): Likewise.
* tests/mv/update.sh: Test the new parameters.
* NEWS: Mention the new feature.
Addresses https://bugs.gnu.org/62572
</content>
</entry>
<entry>
<title>cp,mv: skipping due to -u is success, not failure</title>
<updated>2023-01-31T17:25:25Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-01-31T17:24:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=01503ce7319b099d9deaeab43628e1b2b07a874a'/>
<id>urn:sha1:01503ce7319b099d9deaeab43628e1b2b07a874a</id>
<content type='text'>
This reverts the previous change, so that when a file
is skipped due to -u, this is not considered a failure.
* doc/coreutils.texi: Document this.
* src/copy.c (copy_internal): If --update says to skip,
treat this as success instead of failure.
* tests/mv/update.sh, tests/cp/slink-2-slink.sh:
Revert previous change, to match reverted behavior.
</content>
</entry>
<entry>
<title>cp,ln,mv: when skipping exit with nonzero status</title>
<updated>2023-01-31T16:54:37Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-01-31T16:46:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7a69df88999bedd8e9fccf9f3dfa9ac6907fab66'/>
<id>urn:sha1:7a69df88999bedd8e9fccf9f3dfa9ac6907fab66</id>
<content type='text'>
* NEWS, doc/coreutils.texi: Document this.
* src/copy.c (copy_internal):
* src/ln.c (do_link): Return false when skipping action due to
--interactive or --no-clobber.
* tests/cp/cp-i.sh, tests/cp/preserve-link.sh:
* tests/cp/slink-2-slink.sh, tests/mv/i-1.pl, tests/mv/i-5.sh:
* tests/mv/mv-n.sh, tests/mv/update.sh:
Adjust expectations of exit status to match revised behavior.
</content>
</entry>
<entry>
<title>tests: ensure we fail if mv --no-copy crashes</title>
<updated>2023-01-27T19:46:52Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-01-27T19:46:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=95bc69a7e71dd2a9b2ca11452be19fa856eb2bbf'/>
<id>urn:sha1:95bc69a7e71dd2a9b2ca11452be19fa856eb2bbf</id>
<content type='text'>
* tests/mv/no-copy.sh: Honor `make syntax` check
and use the `returns_ 1 ...` pattern.
</content>
</entry>
<entry>
<title>mv: new option --no-copy</title>
<updated>2023-01-27T19:03:38Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-01-27T18:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=20005ca733e111a61212ee8a6890a54583c55562'/>
<id>urn:sha1:20005ca733e111a61212ee8a6890a54583c55562</id>
<content type='text'>
Wishlist item from Mike Frysinger (Bug#61050).
* src/copy.c (copy_internal):
Do not fall back on copying if x-&gt;no_copy.
* src/copy.h (struct cp_options): New member no_copy.
* src/mv.c (NO_COPY_OPTION): New constant.
(long_options, usage, main): Support --no-copy.
* tests/mv/no-copy.sh: New test.
* tests/local.mk (all_tests): Add it.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2023-01-01T14:50:15Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-01-01T14:50:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=01755d36e7389aef48f712193976205e7381115b'/>
<id>urn:sha1:01755d36e7389aef48f712193976205e7381115b</id>
<content type='text'>
Update to latest gnulib with new copyright year.
Run "make update-copyright" and then...

* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Manually update copyright year,
until we fully sync with gnulib at a later stage.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>mv: test Bug#55029</title>
<updated>2022-04-21T02:45:59Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2022-04-21T02:44:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e087525091b8f0a15eb2354f71032597d5271599'/>
<id>urn:sha1:e087525091b8f0a15eb2354f71032597d5271599</id>
<content type='text'>
* tests/mv/backup-dir.sh: New test for Bug#55029,
reported by Steve Ward.
</content>
</entry>
<entry>
<title>mv: when installing to dir use dir-relative names</title>
<updated>2022-01-30T00:29:18Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2022-01-29T19:40:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=57c812cc3e17ecf5df887029221fe3f2d0cd7ea0'/>
<id>urn:sha1:57c812cc3e17ecf5df887029221fe3f2d0cd7ea0</id>
<content type='text'>
When the destination for mv is a directory, use functions like openat
to access the destination files, when such functions are available.
This should be more efficient and should avoid some race conditions.
Likewise for 'install'.
* src/cp.c (must_be_working_directory, target_directory_operand)
(target_dirfd_valid): Move from here ...
* src/system.h: ... to here, so that install and mv can use them.
Make them inline so GCC doesn’t complain.
* src/install.c (lchown) [HAVE_LCHOWN]: Remove; no longer needed.
(need_copy, copy_file, change_attributes, change_timestamps)
(install_file_in_file, install_file_in_dir):
New args for directory-relative names.  All uses changed.
Continue to pass full names as needed, for diagnostics and for
lower-level functions that do not support directory-relative names.
(install_file_in_dir): Update *TARGET_DIRFD as needed.
(main): Handle target-directory in the new, cp-like way.
* src/mv.c (remove_trailing_slashes): Remove static var; now local.
(do_move): New args for directory-relative names.  All uses changed.
Continue to pass full names as needed, for diagnostics and for
lower-level functions that do not support directory-relative names.
(movefile): Remove; no longer needed.
(main): Handle target-directory in the new, cp-like way.
* tests/install/basic-1.sh:
* tests/mv/diag.sh: Adjust to match new diagnostic wording.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2022-01-02T16:15:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2022-01-02T15:42:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3067a9293af07ba2cf1ababe6b4482196717f806'/>
<id>urn:sha1:3067a9293af07ba2cf1ababe6b4482196717f806</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
</feed>
