GNU bug report logs - #61050
mv: add support for --one-file-system

Previous Next

Package: coreutils;

Reported by: Mike Frysinger <vapier <at> gentoo.org>

Date: Wed, 25 Jan 2023 01:21:01 UTC

Severity: wishlist

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #24 received at 61050 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 61050 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu, vapier <at> gentoo.org
Subject: Re: bug#61050: mv: add support for --one-file-system
Date: Fri, 27 Jan 2023 19:50:18 +0000
On 27/01/2023 19:13, Paul Eggert wrote:
> On 2023-01-25 05:34, Mike Frysinger wrote:
>> should there be a `--copy` flag to be able to undo `--no-copy` ?
> 
> We can add one if there's a need, but mv doesn't have a --clobber option
> to match its --no-clobber and I'm hoping --no-copy is similar.
> 
>> personally i always argue against using negative variable names
> 
> Yes, I considered calling it "rename_only" instead of "no_copy", but the
> pull of the --no-copy option's name was too strong. Besides,
> "rename_only" wasn't quite right either as "mv --no-copy" does more than
> just renaming (e.g., if the destination is not writeable).
> 
> If we can come up with a better name now's a good time to switch. In the
> meantime I installed the attached coreutils patch.

Looks good. I pushed this tweak.

thanks,
Pádraig

commit 95bc69a7e71dd2a9b2ca11452be19fa856eb2bbf (HEAD -> master)
Author: Pádraig Brady <P <at> draigBrady.com>
Date:   Fri Jan 27 19:46:52 2023 +0000

    tests: ensure we fail if mv --no-copy crashes

    * tests/mv/no-copy.sh: Honor `make syntax` check
    and use the `returns_ 1 ...` pattern.

diff --git a/tests/mv/no-copy.sh b/tests/mv/no-copy.sh
index fba475c03..5a55fdf74 100755
--- a/tests/mv/no-copy.sh
+++ b/tests/mv/no-copy.sh
@@ -25,8 +25,8 @@ mkdir dir || framework_failure_
 > dir/a || framework_failure_
 > file || framework_failure_

-mv --no-copy dir "$other_partition_tmpdir" && fail=1
-mv --no-copy file "$other_partition_tmpdir" && fail=1
+returns_ 1 mv --no-copy dir "$other_partition_tmpdir" || fail=1
+returns_ 1 mv --no-copy file "$other_partition_tmpdir" || fail=1
 mv dir "$other_partition_tmpdir" || fail=1
 mv file "$other_partition_tmpdir" || fail=1





This bug report was last modified 2 years and 111 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.