Code

cvsserver: Handle re-added files correctly
authorFrank Lichtenheld <frank@lichtenheld.de>
Wed, 2 May 2007 00:43:14 +0000 (02:43 +0200)
committerJunio C Hamano <junkio@cox.net>
Wed, 2 May 2007 17:41:52 +0000 (10:41 -0700)
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>
git-cvsserver.perl

index 25816c5a21285cae1d8e42f46f26126a03c6631f..3501c1bc3a7fb1482ef3eec10c9fc91bf4d19e4d 100755 (executable)
@@ -2454,7 +2454,7 @@ sub update
                     #$log->debug("ADDED    $name");
                     $head->{$name} = {
                         name => $name,
-                        revision => 1,
+                        revision => $head->{$name}{revision} ? $head->{$name}{revision}+1 : 1,
                         filehash => $hash,
                         commithash => $commit->{hash},
                         modified => $commit->{date},