chiark / gitweb /
dgit clone: Set timestamps in cloned tree to a single unified time.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Oct 2016 16:34:11 +0000 (16:34 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Oct 2016 19:50:48 +0000 (19:50 +0000)
This makes it less likely that the user will trip over any
timestamp-dependent FTBFS bugs (eg #842452).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index fb171751ec9ed9718b9ec218ea9aef2da54c91d3..4c354a478db2515c77efde09f69813a553ec9f89 100644 (file)
@@ -11,6 +11,9 @@ dgit (2.9~) unstable; urgency=low
   * New option --dgit-view-save= for split view quilt modes.
     In particular, means that the output of a split view quilt-fixup
     is left somewhere useful.
+  * dgit clone: Set timestamps in cloned tree to a single unified time.
+    This makes it less likely that the user will trip over any
+    timestamp-dependent FTBFS bugs (eg #842452).
 
  --
 
diff --git a/dgit b/dgit
index 3e746d2cce9808bbc3ca1e74a48c4577e2ff7ee9..efd8963498f255344944c08d13ef832fc9af208b 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";
 }