cvsserver: Handle re-added files correctly
We can't unconditionally assign revision 1.1 to newly added files. In case the file did exist in the past and was deleted we need to honor the old revision number. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Frank Lichtenheld committed
May 2, 2007 at 02:43 UTC
a7da9adb1ff4e2a378fdb2eb486a83ee2d68c847
1 file changed
+1
-1
git-cvsserver.perl
+1
-1
@@ -2454,7 +2454,7 @@ sub update
2454
#$log->debug("ADDED $name");
2455
$head->{$name} = {
2456
name => $name,
2457
- revision => 1,
2457
+ revision => $head->{$name}{revision} ? $head->{$name}{revision}+1 : 1,
2458
filehash => $hash,
2459
commithash => $commit->{hash},
2460
modified => $commit->{date},