Skip to content

Commit

Permalink
Don't use "cp -a" (round 2)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Rob Browning <[email protected]>
  • Loading branch information
rlbdv committed Apr 12, 2019
1 parent b9854b5 commit 9ef9613
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/test-get
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand Down

0 comments on commit 9ef9613

Please sign in to comment.