Thanks, I pushed the attached coreutils patches to fix that. I figure
if sorting by inode helps tar it'll help cp too, so I used that.
>From a22cd3f3514aa9d0c03a55627e0b79aa45bf8ac3 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Wed, 26 Feb 2014 11:22:16 -0800
Subject: [PATCH 1/2] build: update gnulib submodule to latest
---
gnulib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnulib b/gnulib
index cfe23e8..546ff82 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit cfe23e81eb50e13417b1e2818314c50eb33088bb
+Subproject commit 546ff8206b4366d46f9d1fcc08030c2a33a085fa
--
1.8.5.3
>From 13c24a857352e0768934020f75e4ac59f59f19ed Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Wed, 26 Feb 2014 11:30:53 -0800
Subject: [PATCH 2/2] cp: copy files by inode
Problem reported by Bernhard Voelker in:
http://lists.gnu.org/archive/html/coreutils/2014-02/msg00034.html
* src/copy.c (copy_dir): Adjust to recent gnulib change.
---
src/copy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/copy.c b/src/copy.c
index 0b7c59e..7afb801 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -598,7 +598,7 @@ copy_dir (char const *src_name_in, char const *dst_name_in, bool new_dst,
struct cp_options non_command_line_options = *x;
bool ok = true;
- name_space = savedir (src_name_in);
+ name_space = savedir (src_name_in, SAVEDIR_SORT_INODE);
if (name_space == NULL)
{
/* This diagnostic is a bit vague because savedir can fail in
--
1.8.5.3