[PATCH] cvsserver: Handle re-added files correctly

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: Junio C Hamano <junkio@...>, Martin Langhoff <martin.langhoff@...>, Frank Lichtenheld <frank@...>
Date: Tuesday, May 1, 2007 - 8:43 pm

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>
---
 git-cvsserver.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

 Found due to working on the test cases.

diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 087e3ab..3e7bf5b 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2519,7 +2519,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},
-- 
1.5.1.2

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] cvsserver: Handle re-added files correctly, Frank Lichtenheld, (Tue May 1, 8:43 pm)