]> arthur.barton.de Git - bup.git/commitdiff
Don't use "cp -a" (round 2)
authorRob Browning <rlb@defaultvalue.org>
Sun, 29 Mar 2015 16:47:45 +0000 (11:47 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 12 Apr 2019 18:13:52 +0000 (13:13 -0500)
It's not portable -- use portable cp options, or a new t/sync-tree
instead.  Thanks to Greg Troxel (again) for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
t/test-get

index fd9c7e00b01b5d7fc928af808f95d45b9342e3a6..98be58f757ab9f5ed914b2e9c81bb2bfaef97935 100755 (executable)
@@ -863,7 +863,7 @@ def create_get_src():
     exr = exo((bup_cmd, '-d', 'get-src', 'ls', 'src'))
     save_0 = exr.out.splitlines()[0]
     ex(('git', '--git-dir', 'get-src', 'branch', 'src-0', 'src'))
-    ex(('cp', '-a', 'src', 'src-0'))
+    ex(('cp', '-RPp', 'src', 'src-0'))
     
     rmrf('src')
     mkdir('src')
@@ -879,10 +879,10 @@ def create_get_src():
     exr = exo((bup_cmd, '-d', 'get-src', 'ls', 'src'))
     save_1 = exr.out.splitlines()[1]
     ex(('git', '--git-dir', 'get-src', 'branch', 'src-1', 'src'))
-    ex(('cp', '-a', 'src', 'src-1'))
+    ex(('cp', '-RPp', 'src', 'src-1'))
     
     # Make a copy the current state of src so we'll have an ancestor.
-    ex(('cp', '-a',
+    ex(('cp', '-RPp',
          'get-src/refs/heads/src', 'get-src/refs/heads/src-ancestor'))
 
     with open('src/tiny-file', 'a') as f: f.write('xyzzy')