1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-27 19:55:09 +02:00

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 <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Robin Rosenberg 2007-07-25 00:56:20 +02:00 committed by Junio C Hamano
parent 1843d8d545
commit f836f1ae9b

View File

@ -281,6 +281,11 @@
# clean up
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 {
print STDERR <<END;
Usage: GIT_DIR=/path/to/.git ${\basename $0} [-h] [-p] [-v] [-c] [-f] [-m msgprefix] [ parent ] commit