git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] cvsserver: Handle re-added files correctly
@ 2007-05-02  0:43 Frank Lichtenheld
  0 siblings, 0 replies; only message in thread
From: Frank Lichtenheld @ 2007-05-02  0:43 UTC (permalink / raw
  To: git; +Cc: Junio C Hamano, Martin Langhoff, Frank Lichtenheld

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-02  0:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-02  0:43 [PATCH] cvsserver: Handle re-added files correctly Frank Lichtenheld

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).