Commit f836f1ae authored by Robin Rosenberg's avatar Robin Rosenberg Committed by Junio C Hamano

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: default avatarRobin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent 1843d8d5
...@@ -281,6 +281,11 @@ ...@@ -281,6 +281,11 @@
# clean up # clean up
unlink(".cvsexportcommit.diff"); unlink(".cvsexportcommit.diff");
# 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.
sleep(1);
sub usage { sub usage {
print STDERR <<END; print STDERR <<END;
Usage: GIT_DIR=/path/to/.git ${\basename $0} [-h] [-p] [-v] [-c] [-f] [-m msgprefix] [ parent ] commit Usage: GIT_DIR=/path/to/.git ${\basename $0} [-h] [-p] [-v] [-c] [-f] [-m msgprefix] [ parent ] commit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment