git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] cvsserver: Handle re-added files correctly

From
Frank Lichtenheld <frank@lichtenheld.de>
Date
May 2, 2007, 00:43 UTC
Message-ID
<1178066594239-git-send-email-frank@lichtenheld.de>

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
Message 1 of 1 in “cvsserver: Handle re-added files correctly”
  1. cvsserver: Handle re-added files correctlyFrank Lichtenheld, May 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.