chiark / gitweb /
dgit clone: Set timestamps in cloned tree to a single unified time.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 3e746d2..efd8963 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2869,6 +2869,11 @@ sub clone ($) {
     }
     setup_new_tree();
     runcmd @git, qw(reset --hard), lrref();
+    runcmd qw(bash -ec), <<'END';
+        set -o pipefail
+        git ls-tree -r --name-only -z HEAD | \
+        xargs -0r touch -r . --
+END
     printdone "ready for work in $dstdir";
 }