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

[PATCH] New files in git weren't being downloaded during CVS update

From
APAndy Parkins <andyparkins@gmail.com>
Date
Jan 21, 2007, 14:25 UTC
Message-ID
<200701211425.12971.andyparkins@gmail.com>

If a repository was checked out via git-cvsserver and then later a new file is added to the git repository via some other method; a CVS update wasn't fetching the new file.

It would be reported as a new file as
 A some/dir/newfile.c
but would never appear in the directory.

The problem (I think) is that when git-cvsserver detected a new file, it was issuing the new file message then skipping the actual file send part and moving to the next file its list. In fact only an updated file would be transmitted.

The fix is to make the added file section identical to the udpated file
section.  This additionally makes git-cvsserver behave like a
traditional CVS server and will now output
 U some/dir/newfile.c
for an added file.
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
This is in response to Simon Schubert's suggestion that T_ADDED is an
inappropriate category for a remotely added file.  Instead this treats
remotely added files the same as remotely changed files.
 git-cvsserver.perl |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index a33a876..501c182 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -879,11 +879,11 @@ sub req_update
 	    elsif ( !defined($wrev) || $wrev == 0 )
 	    {
 	        $log->info("Tell the client the file will be added");
-		print "MT text A \n";
-                print "MT fname $filename\n";
-                print "MT newline\n";
-		next;
-
+			print "MT +updated\n";
+			print "MT text U \n";
+			print "MT fname $filename\n";
+			print "MT newline\n";
+			print "MT -updated\n";
 	    }
 	    else {
                 $log->info("Updating '$filename' $wrev");
-- 
1.5.0.rc1.gf4b6c
Next: Junio C Hamano
Message 1 of 8 in “New files in git weren't being downloaded during CVS update”
  1. New files in git weren't being downloaded during CVS updateAndy Parkins, Jan 21, 2007
  2. Junio C HamanoJan 22, 2007
  3. Martin LanghoffJan 22, 2007
  4. Junio C HamanoJan 22, 2007
  5. Andy ParkinsJan 22, 2007
  6. New files in git weren't being downloaded during CVS updateAndy Parkins, Jan 22, 2007
  7. New files in git weren't being downloaded during CVS updateAndy Parkins, Jan 22, 2007
  8. Simon 'corecode' SchubertJan 22, 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.