path: root/git-cvsexportcommit.perl
diff options
authorRobin Rosenberg <>2007-07-24 22:56:20 (GMT)
committerJunio C Hamano <>2007-07-25 00:28:10 (GMT)
commitf836f1ae9b1535d6a1aeb4a0e8a33d65edaf9ff8 (patch)
tree6aefe8ea87819de6c0f7842b4878a71c57faeba0 /git-cvsexportcommit.perl
parent1843d8d545de0e94dc4c7d3c9125fb47a99962c4 (diff)
cvsexportcommit: avoid racy CVS problem.
If git cvsexportcommit is executed fast enough in sequence, the CVS timestamps could end up being the same. CVS tries to fix this by sleeping until the CPU clock changes seconds. Unfortunately, the CPU clock and the file system clock are not necessarily the same, so the timestamps could be the same anyway. When that happens CVS may not recognize changed files and cvs will forget to commit some files. Signed-off-by: Robin Rosenberg <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'git-cvsexportcommit.perl')
1 files changed, 5 insertions, 0 deletions
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index e9832d2..a33fa8d 100755
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -281,6 +281,11 @@ if ($opt_c) {
# clean up
+# CVS version 1.11.x and 1.12.x sleeps the wrong way to ensure the timestamp
+# used by CVS and the one set by subsequence file modifications are different.
+# If they are not different CVS will not detect changes.
sub usage {
print STDERR <<END;
Usage: GIT_DIR=/path/to/.git ${\basename $0} [-h] [-p] [-v] [-c] [-f] [-m msgprefix] [ parent ] commit